search for: backendutil

Displaying 20 results from an estimated 50 matches for "backendutil".

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::A...
2017 Jan 05
3
LLVMTargetMachine with optimization level passed from clang.
...e 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 optimization level based on below mentioned logic >> >> CodeGenOpt::Level OptLevel = CodeGenOpt::Default; >> switch (CodeGenOpts.OptimizationLevel) { >> default: break; >> case 0: OptLevel = CodeGenOpt::None; br...
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 Messag...
2020 Mar 23
2
[10.0.0 Release] Release Candidate 5 is here
...gt; > > If nothing new comes up, I plan to tag 'final' on Monday. Testers, if > > you still have cycles, please take this for a quick spin. > > I went ahead and updated all Zig's CI to use rc5, and ran into this problem: > > /usr/lib/llvm-10/lib/libclangCodeGen.a(BackendUtil.cpp.o): In function > `(anonymous > namespace)::EmitAssemblyHelper::EmitAssemblyWithNewPassManager(clang::BackendAction, > std::unique_ptr<llvm::raw_pwrite_stream, > std::default_delete<llvm::raw_pwrite_stream> >)': > BackendUtil.cpp:(.text._ZN12_GLOBAL__N_118EmitAsse...
2017 Jan 06
3
LLVMTargetMachine with optimization level passed from clang.
...ts.llvm.org> Subject: Re: [llvm-dev] LLVMTargetMachine with optimization level passed from clang. > On Jan 6, 2017, at 7:59 AM, Sumanth Gundapaneni via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > 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 don’t see why is it a problem? That’s why I asked e...
2014 Apr 30
2
[LLVMdev] What is HexagonTargetMachine::addPassesForOptimizations for?
...t;craig.topper at gmail.com> wrote: >> This function is marked virtual but doesn't override anything, doesn't have >> any overrides, and has no in tree callers. Can it be removed? > > Given that it is dead, yes :-) > It used to be called from clang, from lib/CodeGen/BackendUtils.cpp, function CreatePasses. It doesn't seem to be the case anymore. I'm not familiar with that part of the code. +Matthew -Krzysztof -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
2011 Nov 22
2
[LLVMdev] Instrumentation passes and -O0 optimization level
...===================--- lib/Transforms/IPO/PassManagerBuilder.cpp   (revision 144800)+++ lib/Transforms/IPO/PassManagerBuilder.cpp   (working copy)@@ -101,6 +101,7 @@     MPM.add(Inliner);     Inliner = 0;   }+ addExtensionsToPM(EP_EnabledOnOptLevel0, MPM);   return; } Index: tools/clang/lib/CodeGen/BackendUtil.cpp===================================================================--- tools/clang/lib/CodeGen/BackendUtil.cpp     (revision 144800)+++ tools/clang/lib/CodeGen/BackendUtil.cpp     (working copy)@@ -150,6 +150,8 @@ if (CodeGenOpts.AddressSanitizer) { PMBuilder.addExtension(PassManagerBuilder::EP_...
2016 Sep 16
2
RFC: module flag for hosted mode
In PR30403 we've been discussing how to encode -ffreestanding when using LTO. This bit is currently dropped during LTO because its only representation is in the TargetLibraryInfo created by clang ( http://llvm-cs.pcc.me.uk/tools/clang/lib/CodeGen/BackendUtil.cpp#258). The proposal is to introduce a module flag that we set in any translation unit compiled in hosted (i.e. -fno-freestanding) mode. At LTO time, if the combined module has this flag (i.e. if any of the inputs have this flag), we compile in hosted mode. This means that if we combine freestan...
2019 Jun 13
3
Using the new pass manager for CodeGen
...the new pass manager. Two questions: 1. Has anybody made an attempt in this direction already? Maybe I am missing a branch out there that has started on this already. From what I can tell, there is no work in-tree in CodeGen that is aware of the new pass manager besides some assembly utilities in BackendUtils.cpp. My initial thoughts in this direction were that there would need to be some new pass manager machinery, for example, things like FunctionToMachineFunctionPassAdaptor that handles what MachineFunctionPass::runOnFunction used to do, along with the associated AnalysisManager plumbing to understa...
2016 Jan 22
2
Clang 3.8 fails with asan enabled
...tizer/llvm/lib/IR/LegacyPassManager.cpp:1627:23 #9 0x19b85f1 in llvm::legacy::PassManagerImpl::run(llvm::Module&) /export/users/amitrokh/llvm-sanitizer/llvm/lib/IR/LegacyPassManager.cpp:1730 #10 0x2761652 in EmitAssembly /export/users/amitrokh/llvm-sanitizer/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp:708:5 #11 0x2761652 in clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::raw_pwrite_stream*) /export/users/amitrokh/llvm-saniti...
2014 Apr 30
2
[LLVMdev] What is HexagonTargetMachine::addPassesForOptimizations for?
...rked virtual but doesn't override anything, >>>> doesn't have >>>> any overrides, and has no in tree callers. Can it be removed? >>> >>> Given that it is dead, yes :-) >>> >> >> It used to be called from clang, from lib/CodeGen/BackendUtils.cpp, >> function CreatePasses. It doesn't seem to be the case anymore. I'm >> not familiar with that part of the code. >> +Matthew >> >> -Krzysztof >> > > It is actually part of a patch that we do not intend to upstream. > Unfortunately thi...
2017 Jan 06
2
LLVMTargetMachine with optimization level passed from clang.
...optimization level passed > from clang. > > > > > >> On Jan 6, 2017, at 7:59 AM, Sumanth Gundapaneni via llvm-dev <llvm- > dev at lists.llvm.org> wrote: > >> > >> 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 don’t see why...
2010 Jul 19
1
[LLVMdev] How to visualise Clang optimisation phases
> Having a look at clang's source, you can find in > "lib/CodeGen/BackendUtil.cpp" the functions where clang builds the > passes to emit code. The optimization passes used are there and you can > simulate them via the "opt" utility, by running each pass one at a time. > LLVM also declares standard module/function passes on > include/llvm/Support/S...
2015 Jan 09
5
[LLVMdev] Enable changing UnsafeFPMath on a per-function basis
...tes to compute the value of TargetOptions::UnsafeFPMath based on the function attributes of all the functions in the module being compiled (see the link below). http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-December/079904.html 6. Move the code in CGCall.cpp that sets the function attributes to BackendUtil.cpp. clang should set the function attributes regardless of whether it is compiling from source code or from an IR file (e.g., clang foo1.ll -o foo1.s -ffast-math), but currently this happens only if it’s compiling from source. Any comments and suggestions are welcome. If we can agree on the main...
2010 Jul 19
0
[LLVMdev] How to visualise Clang optimisation phases
Having a look at clang's source, you can find in "lib/CodeGen/BackendUtil.cpp" the functions where clang builds the passes to emit code. The optimization passes used are there and you can simulate them via the "opt" utility, by running each pass one at a time. LLVM also declares standard module/function passes on include/llvm/Support/StandardPasses.h. Hav...
2010 Jul 16
2
[LLVMdev] How to visualise Clang optimisation phases
When I'm trying to understand how or why the back end does something I've found the -view-* options to llc to be useful. It's not ideal, because "clang" doesn't take those options, so I have to invoke first "clang" and then "llc", and sometimes that combination gives different final code from invoking just "clang", but usually I can construct
2016 Sep 16
2
RFC: module flag for hosted mode
...;peter at pcc.me.uk> wrote: >> >> In PR30403 we've been discussing how to encode -ffreestanding when using LTO. This bit is currently dropped during LTO because its only representation is in the TargetLibraryInfo created by clang (http://llvm-cs.pcc.me.uk/tools/clang/lib/CodeGen/BackendUtil.cpp#258). >> >> The proposal is to introduce a module flag that we set in any translation unit compiled in hosted (i.e. -fno-freestanding) mode. At LTO time, if the combined module has this flag (i.e. if any of the inputs have this flag), we compile in hosted mode. This means that if w...
2018 Feb 07
0
retpoline mitigation and 6.0
...e/dwmw2/git/llvm/lib/IR/LegacyPassManager.cpp:1732:0 #25 0x0000000003f8b5d1 (anonymous namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) /home/dwmw2/git/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp:801:0 #26 0x0000000003f8df15 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::un...
2019 Jul 12
2
[cfe-dev] ARM float16 intrinsic test
...ject/llvm/lib/IR/LegacyPassManager.cpp:1889:0 #22 0x000000000473cfa9 (anonymous namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) /home/nancy/rpp_llvm/llvm-project/clang/lib/CodeGen/BackendUtil.cpp:881:0 #23 0x00000000047404ee clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::un...
2018 Feb 07
6
retpoline mitigation and 6.0
I've landed the patch in r324449. Before we merge this into two different Clang release branches and almost immediately release one of them, I would really like someone to confirm that this patch works well with the Linux kernel. David, if you're up for that, it would be great. Alternatively, Guenter or someone else here can help. On Tue, Feb 6, 2018 at 5:59 PM Chandler Carruth