similar to: Using different opt with clang

Displaying 20 results from an estimated 2000 matches similar to: "Using different opt with clang"

2019 Sep 30
3
Debugging LowerTypeTests in LLVM Using GDB
Hi, I am looking into Control-Flow Integrity for indirect function calls, implemented with jump tables. I want to step through the code that produces these jump tables in GDB. I have built clang and opt from source with debugging symbols. I believe this code lives in llvm/lib/Transforms/LowerTypeTests.cpp, but when I try to debug *opt* by running the command "run -lowertypetests cfi-icall.bc
2020 Apr 30
2
Discrepancy between Debug and Release+Asserts versions of Clang/LLVM
I agree that the ArrayRef is likely the issue. I've debugged a crash caused by a temporary ArrayRef like that a couple times. Either do what David suggested or use a normal array: Metadata *mdArray[] = {ConstantInt::get(Int64Ty, 0), newMD}; ~Craig On Thu, Apr 30, 2020 at 9:56 AM David Blaikie via llvm-dev < llvm-dev at lists.llvm.org> wrote: > > > On Thu, Apr 30, 2020 at
2020 Mar 16
2
Passing arguments to LLVM pass through Clang
Hello, I am adding to an LLVM pass that requires a filename as input. I am able to input this filename as a command line argument when I invoke this pass using opt, but I ultimately need to pass this argument to my code when I compile code with clang. How can I pass this argument to clang so that I can use it in my LLVM pass? Thanks for your help! Best, Shishir Jessu -------------- next part
2020 Apr 30
2
Discrepancy between Debug and Release+Asserts versions of Clang/LLVM
Hello, I am editing the LowerTypeTests pass in LLVM, and part of my additions include the following 3 lines of code: // newTypeName is a std::string MDString* newMD = MDString::get(M.getContext(), newTypeName); ArrayRef<Metadata*> mdArray {ConstantInt::get(Int64Ty, 0), newMD}; auto* node = MDTuple::get(M.getContext(), mdArray); Thus far, I have been developing on a version of Clang with
2020 Jun 09
3
Preventing function call from being optimized out in LTO
Hi David, Sure! Here's a function in sqlite3 called verifyDbFile, compiled with -O3. This is what it looks like when the intermediate bitcode is emitted by clang: link <https://pastebin.com/L3PrK1ac> And here's what happens after I run opt -O3 (no additional command-line arguments) on the file containing this function: link <https://pastebin.com/rZHBm2iU>. I'm not 100%
2020 Apr 09
3
Building libjpeg-turbo with LTO
Adding a couple of lld folks. I helped Shishir debug this, the link line looked like: /home/sjessu/build/bin/clang -O0 -flto -o jcstest jcstest.o ./.libs/libjpeg.a and the issue was that libjpeg.a was created with the system ar instead of llvm-ar. It worked when recreating libjpeg.a with llvm-ar. I noticed that the lld code has some special handling for the case when there is a missing
2020 Apr 08
3
Building libjpeg-turbo with LTO
Hi, I have tried to build libjpeg-turbo <https://github.com/libjpeg-turbo/libjpeg-turbo> with LTO in LLVM, using both clangbut get many errors in lld that look like the following: ld: error: undefined symbol: jpeg_std_error >>> referenced by jcstest.c:76 >>> lto.tmp:(main) ld: error: undefined symbol: jpeg_CreateCompress >>> referenced by
2020 Jun 09
3
Preventing function call from being optimized out in LTO
Hi David, By "dead" do you mean unreachable? My understanding was that the removal of dead code is simply another optimization, which should be disabled after adding "optnone" (and adding the function to llvm.used so the function doesn't later get deleted entirely). I am instrumenting certain basic blocks in an LLVM pass, and would like to compile a binary which
2020 Jul 08
2
Extracting the !dbg property from LLVM IR function calls
Hello, I am compiling a program with debugging information, and am attempting to extract !dbg numbers from function calls in LLVM IR. However, I've found a few inconsistencies. For example, this call exists in my module: %1 = tail call i1 @llvm.type.test(i8* bitcast (i32 (i32)* @_Z5otheri to i8*), metadata !"_ZTSFiiE") #5, *!dbg !69*, !nosanitize !2 I would like to extract the 69
2020 Jun 09
5
Preventing function call from being optimized out in LTO
Hello, I am adding function calls to an LLVM link-time optimization (LTO) pass, using the IRBuilder::CreateCall method. I want these calls to remain in the final x86 binary at any optimization level, but on levels -O2 and -O3, some of these calls are being optimized out. So far, I've tried adding each function in the program (excluding LLVM intrinsics) to the llvm.used set, and I've also
2007 Oct 03
4
form_remote_tag :onsubmit not working.
Hi, Has anyone successfully implemented the :onsubmit option for form_remote_tag. It doesn''t seem to work for me. Is there any specific version of rails which is required for the same. Here''s my piece of code. <script> function set_tojid(){ alert(''onsubmit''); } </script> <%= form_remote_tag :update => '''', :url => {
2017 May 16
2
[RFC] CFI for indirect calls with ThinLTO
On Mon, May 15, 2017 at 6:44 PM, Peter Collingbourne <peter at pcc.me.uk> wrote: > Thanks for sending this out. A few comments below. > > On Mon, May 15, 2017 at 5:17 PM, Evgenii Stepanov via llvm-dev > <llvm-dev at lists.llvm.org> wrote: >> >> Hi, >> >> this is a proposal for the implementation of CFI-icall [1] with ThinLTO. >> >>
2017 May 24
2
[RFC] CFI for indirect calls with ThinLTO
On Tue, May 23, 2017 at 4:39 PM, Evgenii Stepanov <eugeni.stepanov at gmail.com > wrote: > On Tue, May 16, 2017 at 4:33 PM, Evgenii Stepanov > <eugeni.stepanov at gmail.com> wrote: > > On Mon, May 15, 2017 at 6:44 PM, Peter Collingbourne <peter at pcc.me.uk> > wrote: > >> Thanks for sending this out. A few comments below. > >> > >> On
2013 Oct 22
1
Asterisk AMI 1.3 Specification
Hi folks, We are upgrading from AMI 1.0 to AMI 1.3 and looking for any documents or AMI 1.3 Specifications. I found AMI 1.4 Specification in wiki.asterisk.org but not for AMI 1.3. Can someone provide me the link for AMI 1.3 specification ? Thanks in advance Shishir -------------- next part -------------- An HTML attachment was scrubbed... URL:
2017 May 16
2
[RFC] CFI for indirect calls with ThinLTO
Hi, this is a proposal for the implementation of CFI-icall [1] with ThinLTO. Jumptables are generated in the merged module. To generate a jumptable, we need a list of functions with !type annotations, including (in non-cross-dso mode) external functions. Unfortunately, LLVM IR does not preserve unused function declarations, and we don’t want to copy the actual function bodies to the merged
2018 May 01
0
ThinLTO + CFI
On Tue, May 1, 2018 at 11:29 AM, <dmitry.mikulin at sony.com> wrote: > It’s not the functions themselves, it’s the jump tables that end up in the > same section of the thin-link temporary object. If I have, say, foo and bar > and both of them need a jump table entry, both entries will be in the same > section of the temp object. The real functions will be renamed to foo.cfi >
2018 May 01
2
ThinLTO + CFI
That seems to do the trick. I get “symbol ordering file: no such symbol: <blah>” warnings for symbols that didn’t get renamed. Maybe we'll have a separate order file for CFI builds... What about the comment above that line? > On May 1, 2018, at 11:46 AM, Peter Collingbourne <peter at pcc.me.uk> wrote: > > On Tue, May 1, 2018 at 11:29 AM, <dmitry.mikulin at
2018 May 01
0
ThinLTO + CFI
I think we just need to change the section name for non-MachO object formats because "__TEXT,__text,regular,pure_instructions" is the default text section name in MachO. There seems to be a way to get the ".cfi" suffix on section names that doesn't involve setting a custom section name (which would invoke the "everything goes in the same section" behaviour), and
2018 May 02
1
ThinLTO + CFI
Taking out that line breaks some LowerTypeTest tests, need to investigate. Runtime compiler-rt all passed. > On May 1, 2018, at 3:11 PM, Peter Collingbourne <peter at pcc.me.uk> wrote: > > The problem as I recall was that we do not want jumptable sections to appear before __cfi_check, so we gave these jump tables a name so that the bfd default linker script would sort them after
2018 May 01
2
ThinLTO + CFI
Jump table sections already have this prefix: ".text..L.cfi.jumptable.”, without forcing the name with setSection(). Is that good enough? > On May 1, 2018, at 1:16 PM, Peter Collingbourne <peter at pcc.me.uk> wrote: > > I think we just need to change the section name for non-MachO object formats because "__TEXT,__text,regular,pure_instructions" is the default text