similar to: How to force an unused function declaration in clang

Displaying 20 results from an estimated 2000 matches similar to: "How to force an unused function declaration in clang"

2018 Jun 26
2
How to force an unused function declaration in clang
For the same reason GCC allowed the attribute. Even if I want to use/inline a function later on in the pipeline. Regards, Soham Sinha PhD Student, Department of Computer Science Boston University On Tue, Jun 26, 2018 at 8:30 AM mayuyu.io <admin at mayuyu.io> wrote: > Out of curiosity, how does an unused declaration affect the emitted object > file > > Zhang > > > 在
2018 Jun 26
2
How to force an unused function declaration in clang
It does, when the function has a body. When it doesn't, it ignores <https://godbolt.org/g/2BCvht>. The body might be provided later on in the toolchain via linking a library. Regards, Soham Sinha PhD Student, Department of Computer Science Boston University On Tue, Jun 26, 2018 at 10:25 AM Hans Wennborg <hans at chromium.org> wrote: > It works for me: > >
2018 May 15
3
How to inline function from other file in IR
Hello, How can I inline a function mentioned in other file? I have an inline function *foo* in C source file (a.c) which is not referenced in this file. I compile this file to a.ll (I notice that the compiled a.ll doesn't have *foo*'s definition, probably because it was inlined but not called anywhere) I have another C source file b.c with function *bar*; I compile this to b.ll I link
2018 May 10
2
Assembly file compilation flow
Hello, LLVM MC blog post <http://blog.llvm.org/2010/04/intro-to-llvm-mc-project.html> explains fairly well how the backend MC project is working. However, it's not clear to me how LLVM converts an assembly file (.s) to an object file. The driver --verbose option is not giving me much information as well. I want to know the flow. Like, What CodeGen phases does this file pass through? Is
2018 May 05
4
How to add assembly instructions in CodeGen
Hello, I want to add assembly instructions at certain points in a function. This is X86 specific. So I am working in the lib/Target/X86 folder. I create a `MachineFunctionPass` in that folder. I register it in the X86TargetMachine.cpp in addPreEmitPass(). I use BuildMI to insert my own assembly instructions in the MachineFunctionPass. This works and my assembly instructions are inserted at
2018 Jun 25
2
How to include a opt pass in clang driver
Hi Eli, I have tried that: static void registerMyPass(const PassManagerBuilder &, llvm::legacy::PassManagerBase &PM) { PM.add(new MyPass()); } static RegisterStandardPasses RegisterMyPass(PassManagerBuilder::EP_OptimizerLast, registerMyPass); It still couldn't find my pass. Regards, Soham Sinha PhD Student,
2011 Jun 30
0
[LLVMdev] inefficiencies in ConstantUniqueMap ?
On 27 June 2011 18:58, Chris Lattner <clattner at apple.com> wrote: > > On Jun 25, 2011, at 11:59 AM, Jay Foad wrote: > >> I've played with the Clang bits of this. The biggest problem I've >> found is that Clang uses LLVM's type resolution not just for >> forward-declared structs/classes/unions, which convert >> straightforwardly to the new
2018 May 17
1
How to inline function from other file in IR
Hi Soham, “extern inline” keyword will help in this case, with this keyword compiler is forced to keeps the definition of the function and make it available for the external usage. Also it retains the “inlinehint” attribute on the function, with that lto inliner may make it inline. Best, Ashutosh From: llvm-dev [mailto:llvm-dev-bounces at lists.llvm.org] On Behalf Of Mehdi AMINI via llvm-dev
2018 May 07
0
How to add assembly instructions in CodeGen
One place to look might be in the MachineOutliner target hooks in X86InstrInfo and AArch64InstrInfo. The MachineOutliner runs extremely late in the pass pipeline so it might be a good place to look for some inspiration. Of course, because this is *extremely late* it might not do *exactly* what you need. (e.g, this is post-register allocation, post frame-lowering, etc.) - Jessica > On May 4,
2018 Jun 25
2
How to include a opt pass in clang driver
Hello, I have written a pass for the IR and I can run it with opt -load lib/LLVMMyPass.so -mypass -myarguments -S -o output.ll < output.bc I have registered my pass with the following code: static RegisterPass<MyPass> X("mypass", "MyPass Pass (with getAnalysisUsage implemented)"); How do I include the same pass in the clang driver. I tried running the pass: clang
2018 May 17
0
How to inline function from other file in IR
Hi Soham, Are you intending to use the inline keyword in order to control the inlining optimization? The inline keyword is not doing this, it is changing the linkage type of the symbol and instruct the compiler to discard it if there is no call left, and also will instruct the linker to deduplicate. For instance if multiple file include a header that defines an inline function, this function
2018 May 10
0
Assembly file compilation flow
Passing an assembly file to clang does not go through any CodeGen phases. It operates entirely in the MC layer. No MachineFunctions will be created. It just runs it through the MCAsmParser. Most of the setup for this is in clang's tools/driver/cc1as_main.cpp in the function ExecuteAssembler ~Craig On Thu, May 10, 2018 at 1:32 PM Soham Sinha via llvm-dev < llvm-dev at lists.llvm.org>
2018 May 07
2
How to add assembly instructions in CodeGen
Hello Dean, I looked at the XRay Instrumentation. That's a nice engineering effort. I am sure you had your motivation to do this in CodeGen just like I wanted to do. I don't understand all of your code but I get the idea that you are adjusting the alignment with explicit bytes and no-op instructions. My problem is also very much related to yours where my stack pointer ($rsp) alignment
2018 May 08
0
How to add assembly instructions in CodeGen
On Tue, May 8, 2018 at 4:06 AM Soham Sinha <soham1 at bu.edu> wrote: > Hello Dean, > I looked at the XRay Instrumentation. That's a nice engineering effort. I am sure you had your motivation to do this in CodeGen just like I wanted to do. I don't understand all of your code but I get the idea that you are adjusting the alignment with explicit bytes and no-op instructions. My
2011 Jun 27
2
[LLVMdev] inefficiencies in ConstantUniqueMap ?
On Jun 25, 2011, at 11:59 AM, Jay Foad wrote: > On 25 June 2011 13:00, Duncan Sands <baldrick at free.fr> wrote: >>> 3. Clang/dragonegg need to adapt to the new API (help appreciated!) >> >> what needs to be done exactly? > > Background info: http://www.nondot.org/sabre/LLVMNotes/TypeSystemRewrite.txt > > As I understand it, PATypeHolder, OpaqueType
2012 Jul 10
2
[LLVMdev] Clang error compiling
llvm[1]: Compiling APFloat.cpp for Release+Asserts build clang: TargetInfo.cpp:1778: llvm::Type *GetX86_64ByValArgumentPair(llvm::Type *, llvm::Type *, const llvm::TargetData &): Assertion `Lo->isIntegerTy() && "Invalid/unknown lo type"' failed. 0 clang 0x0000000001c132ef 1 clang 0x0000000001c13804 2 libpthread.so.0 0x00002ba7d7eaec60 3
2018 May 14
2
Andresen Algorithm
> > Date: Mon, 14 May 2018 14:26:13 -0400 > From: Kenneth Adam Miller via llvm-dev <llvm-dev at lists.llvm.org> > To: llvm-dev <llvm-dev at lists.llvm.org> > Subject: [llvm-dev] Andresen Algorithm > Message-ID: > <CAK7rcp_yXA79UuLvcD6LPMQBvi9tTpOGAcuWZ > Ux1tFKTyvuh2Q at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" >
2018 May 17
2
Andresen Algorithm
Actually I figured out that it is: opt -cfl-anders-aa *.ll But now I noticed that I need the graph that it computes, and it doesn't seem to emit that. On Wed, May 16, 2018 at 5:19 PM, Kenneth Adam Miller < kennethadammiller at gmail.com> wrote: > Is there a particular way to run a specific alias analysis that is already > implemented on a .ll file produced by clang -S
2012 Apr 23
4
[LLVMdev] gdb + clang/llvm
> > ok, I now have a problem in the code generator. > > Let's say I want to set a breakpoint somewhere in > > clang/lib/CodeGen/CGExprScalar.cpp > > > > What do I have to do in order to trigger breakpoints, see > > backtraces and so on? > > You set a breakpoint and ask to see a backtrace? > > -eric haha, OK, I think I should be more specific.
2014 Oct 18
3
[LLVMdev] Performance regression on ARM
Hi Chandler, That's embarrassing how weird this part of clang is. I have a provisional patch which fixes the problem but underlines clang's problems. I will submit it tonight for comments. суббота, 18 октября 2014 г. пользователь Chandler Carruth написал: > > On Fri, Oct 17, 2014 at 7:51 AM, Anton Korobeynikov < > anton at korobeynikov.info >