search for: codegenopt

Displaying 20 results from an estimated 290 matches for "codegenopt".

2017 Jan 05
4
LLVMTargetMachine with optimization level passed from clang.
I see the BackendUtil.cpp of Clang creates the TargetMachine with the optimization level based on below mentioned logic CodeGenOpt::Level OptLevel = CodeGenOpt::Default; switch (CodeGenOpts.OptimizationLevel) { default: break; case 0: OptLevel = CodeGenOpt::None; break; case 3: OptLevel = CodeGenOpt::Aggressive; break; } As per my understanding, the correspondence between optimization level and CodeGenOpt is...
2017 Jan 05
3
LLVMTargetMachine with optimization level passed from clang.
...mini wrote: >> On Jan 4, 2017, at 4:03 PM, Sumanth Gundapaneni via llvm-dev >> <llvm-dev at lists.llvm.org> wrote: >> >> I see the BackendUtil.cpp of Clang creates the TargetMachine with >> the optimization level based on below mentioned logic >> >> CodeGenOpt::Level OptLevel = CodeGenOpt::Default; >> switch (CodeGenOpts.OptimizationLevel) { >> default: break; >> case 0: OptLevel = CodeGenOpt::None; break; >> case 3: OptLevel = CodeGenOpt::Aggressive; break; >> } >> >> As per my understanding, the correspondence...
2017 Jan 06
3
LLVMTargetMachine with optimization level passed from clang.
Here is a problem scenario. I want to enable a backend pass at -O2 or above. if (TM->getOptLevel() >= CodeGenOpt::Default) addPass(&xxxxx); This pass will be run at -O1 too since clang is creating the TargetMachine with CodeGenOpt::Default for -O1. --Sumanth G -----Original Message----- From: mehdi.amini at apple.com [mailto:mehdi.amini at apple.com] Sent: Friday, January 6, 2017 12:37 PM To: Suman...
2017 Jan 06
2
LLVMTargetMachine with optimization level passed from clang.
...Level() gets the level from TargetMachine which is created by the Backendutil in clang with either "Default", "None" or "Aggressive". Threre is no correspondence for "Less". This boils down to , if I pass "-O1", the Target Machine is created with CodeGenOpt::Default. I am available on IRC @ sgundapa. -----Original Message----- From: jpaquette at apple.com [mailto:jpaquette at apple.com] Sent: Thursday, January 5, 2017 12:24 PM To: sgundapa at codeaurora.org Cc: LLVM Developers <llvm-dev at lists.llvm.org> Subject: Re: [llvm-dev] LLVMTargetMac...
2011 Feb 23
2
[LLVMdev] CodeGenOpt
The existing CodeGenOpt is not flexible enough for our needs. Our customers want to be able to control the optimization level at a fine grain, so we provide them separate dials for general optimization, fp optimization and memory hierarchy optimization. I would like to replace the existing CodeGenOpt::Level enum with a...
2011 Feb 24
2
[LLVMdev] CodeGenOpt
Chris Lattner <clattner at apple.com> writes: >> class CodeGenOpt { >> ... >> public >> getOptLevel() ...; >> getFPLevel() ...; >> getMemLevel() ...; >> }; >> >> Does this sound reasonable? > > I don't think that this is the right way to go. Higher level > decisions like that should affect your ch...
2011 Feb 24
0
[LLVMdev] CodeGenOpt
On Feb 24, 2011, at 8:14 AM, David A. Greene wrote: > Chris Lattner <clattner at apple.com> writes: > >>> class CodeGenOpt { >>> ... >>> public >>> getOptLevel() ...; >>> getFPLevel() ...; >>> getMemLevel() ...; >>> }; >>> >>> Does this sound reasonable? >> >> I don't think that this is the right way to go. Higher level >>...
2017 Jan 06
2
LLVMTargetMachine with optimization level passed from clang.
...passed > from clang. > > > > On Jan 6, 2017, at 10:56 AM, Sumanth Gundapaneni > <sgundapa at codeaurora.org> wrote: > > > > Here is a problem scenario. > > > > I want to enable a backend pass at -O2 or above. > > if (TM->getOptLevel() >= CodeGenOpt::Default) > > addPass(&xxxxx); > > > > This pass will be run at -O1 too since clang is creating the > TargetMachine with CodeGenOpt::Default for -O1. > > Right, you can’t. Can somebody explain why it's not a bug that -O1 and -O2 are identical? Thanks, --paulr...
2011 Feb 24
0
[LLVMdev] CodeGenOpt
On Feb 23, 2011, at 1:49 PM, David Greene wrote: > The existing CodeGenOpt is not flexible enough for our needs. Our > customers want to be able to control the optimization level at a fine > grain, so we provide them separate dials for general optimization, fp > optimization and memory hierarchy optimization. > > I would like to replace the existing CodeG...
2019 Aug 13
4
ORC v2 question
...se_error } Yes raise_error and all other extern functions are explicitly added as global symbols. > > CodeGen optimization seems a more likely culprit: JITTargetMachineBuilder and ExecutionEngineBuilder have different defaults for their CodeGen opt-level. JITTargetMachineBuilder defaults to CodeGenOpt::None, and ExecutionEngineBuilder default to CodeGenOpt::Default. > > What happens if you make the following modification to your setup? > > auto JTMB = llvm::orc::JITTargetMachineBuilder::detectHost(); > JTMB->setCodeGenOptLevel(CodeGenOpt::Default); // <-- Explicitly set Code...
2016 Mar 23
2
Help with pass manager
...g lookuperror; const Target *moduletarget = TargetRegistry::lookupTarget(MArch, moduletriple, lookuperror); if (!moduletarget) { errs() << lookuperror; return 1; } std::string cpuname = getCPUStr(), ftrlist = getFeaturesStr(); CodeGenOpt::Level OLvl = CodeGenOpt::Default; switch ('2') { default: errs() << "invalid optimization level.\n"; return 1; case ' ': break; case '0': OLvl = CodeGenOpt::None; break; case '1': OLvl = Cod...
2014 Nov 17
3
[LLVMdev] [RFC] Embedding command line options in bitcode (PR21471)
...ion of the approach I took in my patch is that command line options that are important to codegen are collected by cl::ParseCommandLineOptions, written to the bitcode as function or module attributes, and read out directly by the optimization passes that need them. cl::opt options are replaced with CodeGenOpt options (subclass of cl::opt), which are needed only to parse the command line and provide the default value when the corresponding options are not in the bitcode. > > I like this approach, since it means the frontend doesn't have to understand > options in order to pass them on to th...
2012 Mar 23
0
[LLVMdev] Execution Engine: CodeGenOpt level
> From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of nlamee at cs.mcgill.ca > Subject: [LLVMdev] Execution Engine: CodeGenOpt level > How can I dynamically change the code generation optimization level (e.g., > None) of a JIT in other to recompile a function with a new optimization > level (e.g., Default)? We set the optimization level with a PassManagerBuilder, which is initialized for each function compilatio...
2016 Mar 24
2
Help with pass manager
...triple, lookuperror); >> >> if (!moduletarget) { >> errs() << lookuperror; >> return 1; >> } >> >> std::string cpuname = getCPUStr(), >> ftrlist = getFeaturesStr(); >> >> CodeGenOpt::Level OLvl = CodeGenOpt::Default; >> switch ('2') { >> default: >> errs() << "invalid optimization level.\n"; >> return 1; >> case ' ': break; >> case '0': OLvl = CodeGen...
2014 Nov 18
3
[LLVMdev] [RFC] Embedding command line options in bitcode (PR21471)
...atch is in the right direction. This is how the command line options are parsed and used by the backend passes: 1. Tools such as clang and llc call cl::ParseCommandLineOptions. Any of the options that should be written to the bitcode as function or module attributes (these options are declared as CodeGenOpt, which is a subclass of cl::opt) are saved to Function or ModuleIntAttrs in CodeGenOptions.cpp. 2. setFunctionAttribute is called to move the function and module options saved in step 1 to the bitcode. Also, options stored in TargetOptions are moved to the bitcode too. Pre-existing attributes in th...
2016 Mar 24
0
Help with pass manager
...rgetRegistry::lookupTarget(MArch, moduletriple, lookuperror); > > if (!moduletarget) { > errs() << lookuperror; > return 1; > } > > std::string cpuname = getCPUStr(), > ftrlist = getFeaturesStr(); > > CodeGenOpt::Level OLvl = CodeGenOpt::Default; > switch ('2') { > default: > errs() << "invalid optimization level.\n"; > return 1; > case ' ': break; > case '0': OLvl = CodeGenOpt::None; break; >...
2012 Mar 22
4
[LLVMdev] Execution Engine: CodeGenOpt level
Hi, How can I dynamically change the code generation optimization level (e.g., None) of a JIT in other to recompile a function with a new optimization level (e.g., Default)? Thank you. Best regards, Nurudeen.
2016 Mar 24
2
Help with pass manager
...et) { >>>> errs() << lookuperror; >>>> return 1; >>>> } >>>> >>>> std::string cpuname = getCPUStr(), >>>> ftrlist = getFeaturesStr(); >>>> >>>> CodeGenOpt::Level OLvl = CodeGenOpt::Default; >>>> switch ('2') { >>>> default: >>>> errs() << "invalid optimization level.\n"; >>>> return 1; >>>> case ' ': break; >>&...
2012 Mar 23
2
[LLVMdev] Execution Engine: CodeGenOpt level
Neat approach, I think. So you set PassManagers's Opt level rather then ExecutionEngine's one? Regards, chenwj -- Wei-Ren Chen (陳韋任) Computer Systems Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2788-3799 #1667 Homepage: http://people.cs.nctu.edu.tw/~chenwj
2012 Mar 23
0
[LLVMdev] Execution Engine: CodeGenOpt level
> From: 陳韋任 [mailto:chenwj at iis.sinica.edu.tw] > Subject: Re: [LLVMdev] Execution Engine: CodeGenOpt level > So you set PassManagers's Opt level rather then ExecutionEngine's one? That's correct. I have no idea what difference doing one or the other (or both) makes. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use o...