search for: codegenoptions

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

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
2017 Jan 05
3
LLVMTargetMachine with optimization level passed from clang.
I want the optimization to be turned on at -O1 and above. In my case, it is a target independent back-end pass. (Eg: MachinePipeliner) On 2017-01-04 18:10, Mehdi Amini 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
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
2017 Jan 06
2
LLVMTargetMachine with optimization level passed from clang.
getOptLevel() 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:
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 more general CodeGenOpt class that can track different sets of optimization
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 choice of passes to
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
2017 Jan 06
2
LLVMTargetMachine with optimization level passed from clang.
> -----Original Message----- > From: llvm-dev [mailto:llvm-dev-bounces at lists.llvm.org] On Behalf Of Mehdi > Amini via llvm-dev > Sent: Friday, January 06, 2017 11:10 AM > To: Sumanth Gundapaneni > Cc: LLVM Developers > Subject: Re: [llvm-dev] LLVMTargetMachine with optimization level passed > from clang. > > > > On Jan 6, 2017, at 10:56 AM, Sumanth
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 CodeGenOpt::Level enum with
2019 Aug 13
4
ORC v2 question
Hi Lang, On Tue, 13 Aug 2019 at 22:03, Lang Hames <lhames at gmail.com> wrote: > When you say your code is not getting optimized, do you mean that IR optimizations are not being applied, or that codegen optimizations are not being applied? > > What do you see if you dump the modules before/after running the pass manager on them, like this: > > dbgs() << "Before
2016 Mar 23
2
Help with pass manager
Sorry in advance for the stupid question, i still don’t understand some concepts like passes. I took a piece of code from llc, and I used it to write a function that creates an object (or assembly) file from an IR module. It compiles without any problems. But program crashes when it reaches add() method of the pass manager. Can you help me figuring out what’s the problem please? here is my
2014 Nov 17
3
[LLVMdev] [RFC] Embedding command line options in bitcode (PR21471)
...there instead of in globals. > >> diff --git a/lib/CodeGen/CodeGenOption.cpp b/lib/CodeGen/CodeGenOption.cpp >> new file mode 100644 >> index 0000000..2d74c2f >> --- /dev/null >> +++ b/lib/CodeGen/CodeGenOption.cpp >> @@ -0,0 +1,59 @@ >> +//===- CodeGen/CodeGenOptions.cpp - Code-gen option. --*- C++ -*-===// >> +// >> +// The LLVM Compiler Infrastructure >> +// >> +// This file is distributed under the University of Illinois Open Source >> +// License. See LICENSE.TXT for details. >> +// >>...
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
2016 Mar 24
2
Help with pass manager
The stack trace: llvm::PMTopLevelManager::addImmutablePass(llvm::ImmutablePass*) llvm::PMTopLevelManager::schedulePass(llvm::Pass*) moduleToObjectFile(llvm::Module*,std::string&,llvm::LLVMContext&) Sometimes it doesn't crash because TargetRegistry::lookupTarget() returns an error which says it doesn't support the current target > On Mar 24, 2016, at 1:14 AM, Mehdi Amini
2014 Nov 18
3
[LLVMdev] [RFC] Embedding command line options in bitcode (PR21471)
...ed 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 the bitcode are overwritten by the options in the command line. 3. The backend passes and sub...
2016 Mar 24
0
Help with pass manager
Assuming you are talking about this line: passmanager.add(tliwp); I don't see anything obviously wrong. Are you hitting an assertion or a pure crash? (if LLVM not built with assertions, please rebuild). What does your debugger gives you as a stracktrace? -- Mehdi > On Mar 23, 2016, at 3:44 PM, Lorenzo Laneve via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > Sorry in
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
Sorry, that's a pure crash I think, assertions are not triggered. Xcode doesn’t map those 2 functions to line numbers because they’re in precompiled libraries On Mar 24, 2016, at 1:44 AM, Mehdi Amini <mehdi.amini at apple.com <mailto:mehdi.amini at apple.com>> wrote: > >> On Mar 23, 2016, at 5:41 PM, Lorenzo Laneve <lore97drk at icloud.com <mailto:lore97drk at
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