1 //===-- X86TargetMachine.cpp - Define TargetMachine for the X86 -----------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file defines the X86 specific subclass of TargetMachine.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #include "X86TargetMachine.h"
14 #include "MCTargetDesc/X86MCTargetDesc.h"
15 #include "TargetInfo/X86TargetInfo.h"
16 #include "X86.h"
17 #include "X86CallLowering.h"
18 #include "X86LegalizerInfo.h"
19 #include "X86MacroFusion.h"
20 #include "X86Subtarget.h"
21 #include "X86TargetObjectFile.h"
22 #include "X86TargetTransformInfo.h"
23 #include "llvm/ADT/Optional.h"
24 #include "llvm/ADT/STLExtras.h"
25 #include "llvm/ADT/SmallString.h"
26 #include "llvm/ADT/StringRef.h"
27 #include "llvm/ADT/Triple.h"
28 #include "llvm/Analysis/TargetTransformInfo.h"
29 #include "llvm/CodeGen/ExecutionDomainFix.h"
30 #include "llvm/CodeGen/GlobalISel/CallLowering.h"
31 #include "llvm/CodeGen/GlobalISel/IRTranslator.h"
32 #include "llvm/CodeGen/GlobalISel/InstructionSelect.h"
33 #include "llvm/CodeGen/GlobalISel/Legalizer.h"
34 #include "llvm/CodeGen/GlobalISel/RegBankSelect.h"
35 #include "llvm/CodeGen/MachineScheduler.h"
36 #include "llvm/CodeGen/Passes.h"
37 #include "llvm/CodeGen/TargetPassConfig.h"
38 #include "llvm/IR/Attributes.h"
39 #include "llvm/IR/DataLayout.h"
40 #include "llvm/IR/Function.h"
41 #include "llvm/MC/MCAsmInfo.h"
42 #include "llvm/Pass.h"
43 #include "llvm/Support/CodeGen.h"
44 #include "llvm/Support/CommandLine.h"
45 #include "llvm/Support/ErrorHandling.h"
46 #include "llvm/Support/TargetRegistry.h"
47 #include "llvm/Target/TargetLoweringObjectFile.h"
48 #include "llvm/Target/TargetOptions.h"
49 #include "llvm/Transforms/CFGuard.h"
50 #include <memory>
51 #include <string>
52 
53 using namespace llvm;
54 
55 static cl::opt<bool> EnableMachineCombinerPass("x86-machine-combiner",
56                                cl::desc("Enable the machine combiner pass"),
57                                cl::init(true), cl::Hidden);
58 
59 extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeX86Target() {
60   // Register the target.
61   RegisterTargetMachine<X86TargetMachine> X(getTheX86_32Target());
62   RegisterTargetMachine<X86TargetMachine> Y(getTheX86_64Target());
63 
64   PassRegistry &PR = *PassRegistry::getPassRegistry();
65   initializeX86LowerAMXIntrinsicsLegacyPassPass(PR);
66   initializeX86LowerAMXTypeLegacyPassPass(PR);
67   initializeGlobalISel(PR);
68   initializeWinEHStatePassPass(PR);
69   initializeFixupBWInstPassPass(PR);
70   initializeEvexToVexInstPassPass(PR);
71   initializeFixupLEAPassPass(PR);
72   initializeFPSPass(PR);
73   initializeX86FixupSetCCPassPass(PR);
74   initializeX86CallFrameOptimizationPass(PR);
75   initializeX86CmovConverterPassPass(PR);
76   initializeX86TileConfigPass(PR);
77   initializeX86LowerTileCopyPass(PR);
78   initializeX86ExpandPseudoPass(PR);
79   initializeX86ExecutionDomainFixPass(PR);
80   initializeX86DomainReassignmentPass(PR);
81   initializeX86AvoidSFBPassPass(PR);
82   initializeX86AvoidTrailingCallPassPass(PR);
83   initializeX86SpeculativeLoadHardeningPassPass(PR);
84   initializeX86SpeculativeExecutionSideEffectSuppressionPass(PR);
85   initializeX86FlagsCopyLoweringPassPass(PR);
86   initializeX86LoadValueInjectionLoadHardeningPassPass(PR);
87   initializeX86LoadValueInjectionRetHardeningPassPass(PR);
88   initializeX86OptimizeLEAPassPass(PR);
89   initializeX86PartialReductionPass(PR);
90   initializePseudoProbeInserterPass(PR);
91 }
92 
93 static std::unique_ptr<TargetLoweringObjectFile> createTLOF(const Triple &TT) {
94   if (TT.isOSBinFormatMachO()) {
95     if (TT.getArch() == Triple::x86_64)
96       return std::make_unique<X86_64MachoTargetObjectFile>();
97     return std::make_unique<TargetLoweringObjectFileMachO>();
98   }
99 
100   if (TT.isOSBinFormatCOFF())
101     return std::make_unique<TargetLoweringObjectFileCOFF>();
102   return std::make_unique<X86ELFTargetObjectFile>();
103 }
104 
105 static std::string computeDataLayout(const Triple &TT) {
106   // X86 is little endian
107   std::string Ret = "e";
108 
109   Ret += DataLayout::getManglingComponent(TT);
110   // X86 and x32 have 32 bit pointers.
111   if ((TT.isArch64Bit() &&
112        (TT.getEnvironment() == Triple::GNUX32 || TT.isOSNaCl())) ||
113       !TT.isArch64Bit())
114     Ret += "-p:32:32";
115 
116   // Address spaces for 32 bit signed, 32 bit unsigned, and 64 bit pointers.
117   Ret += "-p270:32:32-p271:32:32-p272:64:64";
118 
119   // Some ABIs align 64 bit integers and doubles to 64 bits, others to 32.
120   if (TT.isArch64Bit() || TT.isOSWindows() || TT.isOSNaCl())
121     Ret += "-i64:64";
122   else if (TT.isOSIAMCU())
123     Ret += "-i64:32-f64:32";
124   else
125     Ret += "-f64:32:64";
126 
127   // Some ABIs align long double to 128 bits, others to 32.
128   if (TT.isOSNaCl() || TT.isOSIAMCU())
129     ; // No f80
130   else if (TT.isArch64Bit() || TT.isOSDarwin())
131     Ret += "-f80:128";
132   else
133     Ret += "-f80:32";
134 
135   if (TT.isOSIAMCU())
136     Ret += "-f128:32";
137 
138   // The registers can hold 8, 16, 32 or, in x86-64, 64 bits.
139   if (TT.isArch64Bit())
140     Ret += "-n8:16:32:64";
141   else
142     Ret += "-n8:16:32";
143 
144   // The stack is aligned to 32 bits on some ABIs and 128 bits on others.
145   if ((!TT.isArch64Bit() && TT.isOSWindows()) || TT.isOSIAMCU())
146     Ret += "-a:0:32-S32";
147   else
148     Ret += "-S128";
149 
150   return Ret;
151 }
152 
153 static Reloc::Model getEffectiveRelocModel(const Triple &TT,
154                                            bool JIT,
155                                            Optional<Reloc::Model> RM) {
156   bool is64Bit = TT.getArch() == Triple::x86_64;
157   if (!RM.hasValue()) {
158     // JIT codegen should use static relocations by default, since it's
159     // typically executed in process and not relocatable.
160     if (JIT)
161       return Reloc::Static;
162 
163     // Darwin defaults to PIC in 64 bit mode and dynamic-no-pic in 32 bit mode.
164     // Win64 requires rip-rel addressing, thus we force it to PIC. Otherwise we
165     // use static relocation model by default.
166     if (TT.isOSDarwin()) {
167       if (is64Bit)
168         return Reloc::PIC_;
169       return Reloc::DynamicNoPIC;
170     }
171     if (TT.isOSWindows() && is64Bit)
172       return Reloc::PIC_;
173     return Reloc::Static;
174   }
175 
176   // ELF and X86-64 don't have a distinct DynamicNoPIC model.  DynamicNoPIC
177   // is defined as a model for code which may be used in static or dynamic
178   // executables but not necessarily a shared library. On X86-32 we just
179   // compile in -static mode, in x86-64 we use PIC.
180   if (*RM == Reloc::DynamicNoPIC) {
181     if (is64Bit)
182       return Reloc::PIC_;
183     if (!TT.isOSDarwin())
184       return Reloc::Static;
185   }
186 
187   // If we are on Darwin, disallow static relocation model in X86-64 mode, since
188   // the Mach-O file format doesn't support it.
189   if (*RM == Reloc::Static && TT.isOSDarwin() && is64Bit)
190     return Reloc::PIC_;
191 
192   return *RM;
193 }
194 
195 static CodeModel::Model getEffectiveX86CodeModel(Optional<CodeModel::Model> CM,
196                                                  bool JIT, bool Is64Bit) {
197   if (CM) {
198     if (*CM == CodeModel::Tiny)
199       report_fatal_error("Target does not support the tiny CodeModel", false);
200     return *CM;
201   }
202   if (JIT)
203     return Is64Bit ? CodeModel::Large : CodeModel::Small;
204   return CodeModel::Small;
205 }
206 
207 /// Create an X86 target.
208 ///
209 X86TargetMachine::X86TargetMachine(const Target &T, const Triple &TT,
210                                    StringRef CPU, StringRef FS,
211                                    const TargetOptions &Options,
212                                    Optional<Reloc::Model> RM,
213                                    Optional<CodeModel::Model> CM,
214                                    CodeGenOpt::Level OL, bool JIT)
215     : LLVMTargetMachine(
216           T, computeDataLayout(TT), TT, CPU, FS, Options,
217           getEffectiveRelocModel(TT, JIT, RM),
218           getEffectiveX86CodeModel(CM, JIT, TT.getArch() == Triple::x86_64),
219           OL),
220       TLOF(createTLOF(getTargetTriple())), IsJIT(JIT) {
221   // On PS4, the "return address" of a 'noreturn' call must still be within
222   // the calling function, and TrapUnreachable is an easy way to get that.
223   if (TT.isPS4() || TT.isOSBinFormatMachO()) {
224     this->Options.TrapUnreachable = true;
225     this->Options.NoTrapAfterNoreturn = TT.isOSBinFormatMachO();
226   }
227 
228   setMachineOutliner(true);
229 
230   // x86 supports the debug entry values.
231   setSupportsDebugEntryValues(true);
232 
233   initAsmInfo();
234 }
235 
236 X86TargetMachine::~X86TargetMachine() = default;
237 
238 const X86Subtarget *
239 X86TargetMachine::getSubtargetImpl(const Function &F) const {
240   Attribute CPUAttr = F.getFnAttribute("target-cpu");
241   Attribute TuneAttr = F.getFnAttribute("tune-cpu");
242   Attribute FSAttr = F.getFnAttribute("target-features");
243 
244   StringRef CPU =
245       CPUAttr.isValid() ? CPUAttr.getValueAsString() : (StringRef)TargetCPU;
246   StringRef TuneCPU =
247       TuneAttr.isValid() ? TuneAttr.getValueAsString() : (StringRef)CPU;
248   StringRef FS =
249       FSAttr.isValid() ? FSAttr.getValueAsString() : (StringRef)TargetFS;
250 
251   SmallString<512> Key;
252   // The additions here are ordered so that the definitely short strings are
253   // added first so we won't exceed the small size. We append the
254   // much longer FS string at the end so that we only heap allocate at most
255   // one time.
256 
257   // Extract prefer-vector-width attribute.
258   unsigned PreferVectorWidthOverride = 0;
259   Attribute PreferVecWidthAttr = F.getFnAttribute("prefer-vector-width");
260   if (PreferVecWidthAttr.isValid()) {
261     StringRef Val = PreferVecWidthAttr.getValueAsString();
262     unsigned Width;
263     if (!Val.getAsInteger(0, Width)) {
264       Key += "prefer-vector-width=";
265       Key += Val;
266       PreferVectorWidthOverride = Width;
267     }
268   }
269 
270   // Extract min-legal-vector-width attribute.
271   unsigned RequiredVectorWidth = UINT32_MAX;
272   Attribute MinLegalVecWidthAttr = F.getFnAttribute("min-legal-vector-width");
273   if (MinLegalVecWidthAttr.isValid()) {
274     StringRef Val = MinLegalVecWidthAttr.getValueAsString();
275     unsigned Width;
276     if (!Val.getAsInteger(0, Width)) {
277       Key += "min-legal-vector-width=";
278       Key += Val;
279       RequiredVectorWidth = Width;
280     }
281   }
282 
283   // Add CPU to the Key.
284   Key += CPU;
285 
286   // Add tune CPU to the Key.
287   Key += "tune=";
288   Key += TuneCPU;
289 
290   // Keep track of the start of the feature portion of the string.
291   unsigned FSStart = Key.size();
292 
293   // FIXME: This is related to the code below to reset the target options,
294   // we need to know whether or not the soft float flag is set on the
295   // function before we can generate a subtarget. We also need to use
296   // it as a key for the subtarget since that can be the only difference
297   // between two functions.
298   bool SoftFloat =
299       F.getFnAttribute("use-soft-float").getValueAsString() == "true";
300   // If the soft float attribute is set on the function turn on the soft float
301   // subtarget feature.
302   if (SoftFloat)
303     Key += FS.empty() ? "+soft-float" : "+soft-float,";
304 
305   Key += FS;
306 
307   // We may have added +soft-float to the features so move the StringRef to
308   // point to the full string in the Key.
309   FS = Key.substr(FSStart);
310 
311   auto &I = SubtargetMap[Key];
312   if (!I) {
313     // This needs to be done before we create a new subtarget since any
314     // creation will depend on the TM and the code generation flags on the
315     // function that reside in TargetOptions.
316     resetTargetOptions(F);
317     I = std::make_unique<X86Subtarget>(
318         TargetTriple, CPU, TuneCPU, FS, *this,
319         MaybeAlign(Options.StackAlignmentOverride), PreferVectorWidthOverride,
320         RequiredVectorWidth);
321   }
322   return I.get();
323 }
324 
325 bool X86TargetMachine::isNoopAddrSpaceCast(unsigned SrcAS,
326                                            unsigned DestAS) const {
327   assert(SrcAS != DestAS && "Expected different address spaces!");
328   if (getPointerSize(SrcAS) != getPointerSize(DestAS))
329     return false;
330   return SrcAS < 256 && DestAS < 256;
331 }
332 
333 //===----------------------------------------------------------------------===//
334 // X86 TTI query.
335 //===----------------------------------------------------------------------===//
336 
337 TargetTransformInfo
338 X86TargetMachine::getTargetTransformInfo(const Function &F) {
339   return TargetTransformInfo(X86TTIImpl(this, F));
340 }
341 
342 //===----------------------------------------------------------------------===//
343 // Pass Pipeline Configuration
344 //===----------------------------------------------------------------------===//
345 
346 namespace {
347 
348 /// X86 Code Generator Pass Configuration Options.
349 class X86PassConfig : public TargetPassConfig {
350 public:
351   X86PassConfig(X86TargetMachine &TM, PassManagerBase &PM)
352     : TargetPassConfig(TM, PM) {}
353 
354   X86TargetMachine &getX86TargetMachine() const {
355     return getTM<X86TargetMachine>();
356   }
357 
358   ScheduleDAGInstrs *
359   createMachineScheduler(MachineSchedContext *C) const override {
360     ScheduleDAGMILive *DAG = createGenericSchedLive(C);
361     DAG->addMutation(createX86MacroFusionDAGMutation());
362     return DAG;
363   }
364 
365   ScheduleDAGInstrs *
366   createPostMachineScheduler(MachineSchedContext *C) const override {
367     ScheduleDAGMI *DAG = createGenericSchedPostRA(C);
368     DAG->addMutation(createX86MacroFusionDAGMutation());
369     return DAG;
370   }
371 
372   void addIRPasses() override;
373   bool addInstSelector() override;
374   bool addIRTranslator() override;
375   bool addLegalizeMachineIR() override;
376   bool addRegBankSelect() override;
377   bool addGlobalInstructionSelect() override;
378   bool addILPOpts() override;
379   bool addPreISel() override;
380   void addMachineSSAOptimization() override;
381   void addPreRegAlloc() override;
382   void addPostRegAlloc() override;
383   void addPreEmitPass() override;
384   void addPreEmitPass2() override;
385   void addPreSched2() override;
386   bool addPreRewrite() override;
387 
388   std::unique_ptr<CSEConfigBase> getCSEConfig() const override;
389 };
390 
391 class X86ExecutionDomainFix : public ExecutionDomainFix {
392 public:
393   static char ID;
394   X86ExecutionDomainFix() : ExecutionDomainFix(ID, X86::VR128XRegClass) {}
395   StringRef getPassName() const override {
396     return "X86 Execution Dependency Fix";
397   }
398 };
399 char X86ExecutionDomainFix::ID;
400 
401 } // end anonymous namespace
402 
403 INITIALIZE_PASS_BEGIN(X86ExecutionDomainFix, "x86-execution-domain-fix",
404   "X86 Execution Domain Fix", false, false)
405 INITIALIZE_PASS_DEPENDENCY(ReachingDefAnalysis)
406 INITIALIZE_PASS_END(X86ExecutionDomainFix, "x86-execution-domain-fix",
407   "X86 Execution Domain Fix", false, false)
408 
409 TargetPassConfig *X86TargetMachine::createPassConfig(PassManagerBase &PM) {
410   return new X86PassConfig(*this, PM);
411 }
412 
413 void X86PassConfig::addIRPasses() {
414   addPass(createAtomicExpandPass());
415 
416   // We add both pass anyway and when these two passes run, we skip the pass
417   // based on the option level and option attribute.
418   addPass(createX86LowerAMXIntrinsicsPass());
419   addPass(createX86LowerAMXTypePass());
420 
421   TargetPassConfig::addIRPasses();
422 
423   if (TM->getOptLevel() != CodeGenOpt::None) {
424     addPass(createInterleavedAccessPass());
425     addPass(createX86PartialReductionPass());
426   }
427 
428   // Add passes that handle indirect branch removal and insertion of a retpoline
429   // thunk. These will be a no-op unless a function subtarget has the retpoline
430   // feature enabled.
431   addPass(createIndirectBrExpandPass());
432 
433   // Add Control Flow Guard checks.
434   const Triple &TT = TM->getTargetTriple();
435   if (TT.isOSWindows()) {
436     if (TT.getArch() == Triple::x86_64) {
437       addPass(createCFGuardDispatchPass());
438     } else {
439       addPass(createCFGuardCheckPass());
440     }
441   }
442 }
443 
444 bool X86PassConfig::addInstSelector() {
445   // Install an instruction selector.
446   addPass(createX86ISelDag(getX86TargetMachine(), getOptLevel()));
447 
448   // For ELF, cleanup any local-dynamic TLS accesses.
449   if (TM->getTargetTriple().isOSBinFormatELF() &&
450       getOptLevel() != CodeGenOpt::None)
451     addPass(createCleanupLocalDynamicTLSPass());
452 
453   addPass(createX86GlobalBaseRegPass());
454   return false;
455 }
456 
457 bool X86PassConfig::addIRTranslator() {
458   addPass(new IRTranslator(getOptLevel()));
459   return false;
460 }
461 
462 bool X86PassConfig::addLegalizeMachineIR() {
463   addPass(new Legalizer());
464   return false;
465 }
466 
467 bool X86PassConfig::addRegBankSelect() {
468   addPass(new RegBankSelect());
469   return false;
470 }
471 
472 bool X86PassConfig::addGlobalInstructionSelect() {
473   addPass(new InstructionSelect(getOptLevel()));
474   return false;
475 }
476 
477 bool X86PassConfig::addILPOpts() {
478   addPass(&EarlyIfConverterID);
479   if (EnableMachineCombinerPass)
480     addPass(&MachineCombinerID);
481   addPass(createX86CmovConverterPass());
482   return true;
483 }
484 
485 bool X86PassConfig::addPreISel() {
486   // Only add this pass for 32-bit x86 Windows.
487   const Triple &TT = TM->getTargetTriple();
488   if (TT.isOSWindows() && TT.getArch() == Triple::x86)
489     addPass(createX86WinEHStatePass());
490   return true;
491 }
492 
493 void X86PassConfig::addPreRegAlloc() {
494   if (getOptLevel() != CodeGenOpt::None) {
495     addPass(&LiveRangeShrinkID);
496     addPass(createX86FixupSetCC());
497     addPass(createX86OptimizeLEAs());
498     addPass(createX86CallFrameOptimization());
499     addPass(createX86AvoidStoreForwardingBlocks());
500   }
501 
502   addPass(createX86SpeculativeLoadHardeningPass());
503   addPass(createX86FlagsCopyLoweringPass());
504   addPass(createX86WinAllocaExpander());
505 
506   if (getOptLevel() != CodeGenOpt::None) {
507     addPass(createX86PreTileConfigPass());
508   }
509 }
510 
511 void X86PassConfig::addMachineSSAOptimization() {
512   addPass(createX86DomainReassignmentPass());
513   TargetPassConfig::addMachineSSAOptimization();
514 }
515 
516 void X86PassConfig::addPostRegAlloc() {
517   addPass(createX86LowerTileCopyPass());
518   addPass(createX86FloatingPointStackifierPass());
519   // When -O0 is enabled, the Load Value Injection Hardening pass will fall back
520   // to using the Speculative Execution Side Effect Suppression pass for
521   // mitigation. This is to prevent slow downs due to
522   // analyses needed by the LVIHardening pass when compiling at -O0.
523   if (getOptLevel() != CodeGenOpt::None)
524     addPass(createX86LoadValueInjectionLoadHardeningPass());
525 }
526 
527 void X86PassConfig::addPreSched2() { addPass(createX86ExpandPseudoPass()); }
528 
529 void X86PassConfig::addPreEmitPass() {
530   if (getOptLevel() != CodeGenOpt::None) {
531     addPass(new X86ExecutionDomainFix());
532     addPass(createBreakFalseDeps());
533   }
534 
535   addPass(createX86IndirectBranchTrackingPass());
536 
537   addPass(createX86IssueVZeroUpperPass());
538 
539   if (getOptLevel() != CodeGenOpt::None) {
540     addPass(createX86FixupBWInsts());
541     addPass(createX86PadShortFunctions());
542     addPass(createX86FixupLEAs());
543   }
544   addPass(createX86EvexToVexInsts());
545   addPass(createX86DiscriminateMemOpsPass());
546   addPass(createX86InsertPrefetchPass());
547   addPass(createX86InsertX87waitPass());
548 }
549 
550 void X86PassConfig::addPreEmitPass2() {
551   const Triple &TT = TM->getTargetTriple();
552   const MCAsmInfo *MAI = TM->getMCAsmInfo();
553 
554   // The X86 Speculative Execution Pass must run after all control
555   // flow graph modifying passes. As a result it was listed to run right before
556   // the X86 Retpoline Thunks pass. The reason it must run after control flow
557   // graph modifications is that the model of LFENCE in LLVM has to be updated
558   // (FIXME: https://bugs.llvm.org/show_bug.cgi?id=45167). Currently the
559   // placement of this pass was hand checked to ensure that the subsequent
560   // passes don't move the code around the LFENCEs in a way that will hurt the
561   // correctness of this pass. This placement has been shown to work based on
562   // hand inspection of the codegen output.
563   addPass(createX86SpeculativeExecutionSideEffectSuppression());
564   addPass(createX86IndirectThunksPass());
565 
566   // Insert extra int3 instructions after trailing call instructions to avoid
567   // issues in the unwinder.
568   if (TT.isOSWindows() && TT.getArch() == Triple::x86_64)
569     addPass(createX86AvoidTrailingCallPass());
570 
571   // Verify basic block incoming and outgoing cfa offset and register values and
572   // correct CFA calculation rule where needed by inserting appropriate CFI
573   // instructions.
574   if (!TT.isOSDarwin() &&
575       (!TT.isOSWindows() ||
576        MAI->getExceptionHandlingType() == ExceptionHandling::DwarfCFI))
577     addPass(createCFIInstrInserter());
578 
579   if (TT.isOSWindows()) {
580     // Identify valid longjmp targets for Windows Control Flow Guard.
581     addPass(createCFGuardLongjmpPass());
582     // Identify valid eh continuation targets for Windows EHCont Guard.
583     addPass(createEHContGuardCatchretPass());
584   }
585   addPass(createX86LoadValueInjectionRetHardeningPass());
586 }
587 
588 bool X86PassConfig::addPreRewrite() {
589   addPass(createX86TileConfigPass());
590   return true;
591 }
592 
593 std::unique_ptr<CSEConfigBase> X86PassConfig::getCSEConfig() const {
594   return getStandardCSEConfigForOpt(TM->getOptLevel());
595 }
596