summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineModuleInfo.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fixed version of 121434 with no new memory leaks.Rafael Espindola2010-12-101-3/+4
| | | | llvm-svn: 121471
* Revert my previous patch to make the valgrind bots happy.Rafael Espindola2010-12-101-4/+3
| | | | llvm-svn: 121461
* Initial support for the cfi directives. This is just enough to getRafael Espindola2010-12-091-3/+4
| | | | | | | | | | | f: .cfi_startproc nop .cfi_endproc assembled (on ELF). llvm-svn: 121434
* CodeGen-Windows: Only emit _fltused if a VarArg function is called with ↵Michael J. Spencer2010-10-211-1/+1
| | | | | | | | floating point args. This should be the minimum set of functions that could possibly need it. llvm-svn: 116978
* Get rid of static constructors for pass registration. Instead, every pass ↵Owen Anderson2010-10-191-0/+1
| | | | | | | | | | | | | | | | | exposes an initializeMyPassFunction(), which must be called in the pass's constructor. This function uses static dependency declarations to recursively initialize the pass's dependencies. Clients that only create passes through the createFooPass() APIs will require no changes. Clients that want to use the CommandLine options for passes will need to manually call the appropriate initialization functions in PassInitialization.h before parsing commandline arguments. I have tested this with all standard configurations of clang and llvm-gcc on Darwin. It is possible that there are problems with the static dependencies that will only be visible with non-standard options. If you encounter any crash in pass registration/creation, please send the testcase to me directly. llvm-svn: 116820
* X86-Windows: Emit an undefined global __fltused symbol when targeting WindowsMichael J. Spencer2010-10-161-1/+2
| | | | | | if any floating point arguments are passed to an external function. llvm-svn: 116665
* Whitespace!Michael J. Spencer2010-10-161-23/+23
| | | | llvm-svn: 116664
* Now with fewer extraneous semicolons!Owen Anderson2010-10-071-1/+1
| | | | llvm-svn: 115996
* zap dead code.Chris Lattner2010-09-041-17/+0
| | | | llvm-svn: 113073
* Reapply r110396, with fixes to appease the Linux buildbot gods.Owen Anderson2010-08-061-2/+2
| | | | llvm-svn: 110460
* Revert r110396 to fix buildbots.Owen Anderson2010-08-061-2/+2
| | | | llvm-svn: 110410
* Don't use PassInfo* as a type identifier for passes. Instead, use the ↵Owen Anderson2010-08-051-2/+2
| | | | | | | | address of the static ID member as the sole unique type identifier. Clean up APIs related to this change. llvm-svn: 110396
* Fix batch of converting RegisterPass<> to INTIALIZE_PASS().Owen Anderson2010-07-211-2/+2
| | | | llvm-svn: 109045
* Revert r108369, sorting llvm.dbg.declare information by source position,Dan Gohman2010-07-161-7/+0
| | | | | | | | | | | | | since it doesn't work for front-ends which don't emit column information (which includes llvm-gcc in its present configuration), and doesn't work for clang for K&R style variables where the variables are declared in a different order from the parameter list. Instead, make a separate pass through the instructions to collect the llvm.dbg.declare instructions in order. This ensures that the debug information for variables is emitted in this order. llvm-svn: 108538
* Make the order in which variables are described in debug informationDan Gohman2010-07-141-0/+23
| | | | | | | | independent of the order that isel happens to visit the dbg_declare intrinsics. This fixes a bug in which the formal arguments were being printed in reverse order, now that fast isel is going bottom up. llvm-svn: 108369
* The JIT calls TidyLandingPads to tidy up the landing pads. However, because theBill Wendling2010-04-161-3/+8
| | | | | | | | | | | | | | | | JIT doesn't use the MC back-end asm printer to emit labels that it uses, the section for the MCSymbol is never set. And thus the MCSymbol for the EH label isn't marked as "defined". Because of that, TidyLandingPads removes the needed landing pads from the JIT output. This breaks EH for every JIT program. This is a work-around for this limitation. We pass in the label locations map. If the label has a non-zero value, then it was "emitted" by the JIT and TidyLandingPads shouldn't remove that label. A nicer solution would be to mark the MCSymbol as "used" by the JIT and not rely upon the section being set to determine if it's defined or not. llvm-svn: 101453
* prune includesGabor Greif2010-04-151-2/+0
| | | | llvm-svn: 101385
* Add const qualifiers to CodeGen's use of LLVM IR constructs.Dan Gohman2010-04-151-9/+9
| | | | llvm-svn: 101334
* Give MachineModuleInfo an actual Module*.Chris Lattner2010-04-061-0/+1
| | | | llvm-svn: 100508
* Fix PR6673: updating the callback should not clear the map.Chris Lattner2010-03-221-1/+5
| | | | llvm-svn: 99227
* Fix the third (and last known) case of code update problems due Chris Lattner2010-03-161-21/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | to LLVM IR changes with addr label weirdness. In the testcase, we generate references to the two bb's when codegen'ing the first function: _test1: ## @test1 leaq Ltmp0(%rip), %rax .. leaq Ltmp1(%rip), %rax Then continue to codegen the second function where the blocks get merged. We're now smart enough to emit both labels, producing this code: _test_fun: ## @test_fun ## BB#0: ## %entry Ltmp1: ## Block address taken Ltmp0: ## BB#1: ## %ret movl $-1, %eax ret Rejoice. llvm-svn: 98595
* Implement support for the case when a reference to a addr-of-bb Chris Lattner2010-03-151-6/+59
| | | | | | | | | label is generated, but then the block is deleted. Since the value is undefined, we just emit the label right after the entry label of the function. It might matter that the label is in the same section as the function was afterall. llvm-svn: 98579
* Fix the case when a reference to an address taken BB is emitted in oneChris Lattner2010-03-151-6/+110
| | | | | | | | function, then the BB is RAUW'd before the definition is emitted. There are still two cases not being handled, but this should improve us back to the situation before I touched anything. llvm-svn: 98566
* fix AsmPrinter::GetBlockAddressSymbol to always return a uniqueChris Lattner2010-03-141-0/+12
| | | | | | | label instead of trying to form one based on the BB name (which causes collisions if the name is empty). This fixes PR6608 llvm-svn: 98495
* get MMI out of the label uniquing business, just go to MCContextChris Lattner2010-03-141-9/+2
| | | | | | to get unique assembler temporary labels. llvm-svn: 98489
* change the LabelSDNode to be EHLabelSDNode and make it holdChris Lattner2010-03-141-5/+4
| | | | | | | | an MCSymbol. Make the EH_LABEL MachineInstr hold its label with an MCSymbol instead of ID. Fix a bug in MMI.cpp which would return labels named "Label4" instead of "label4". llvm-svn: 98463
* eliminate InvalidateLabel and LabelIDList from MMI and replaceChris Lattner2010-03-141-2/+2
| | | | | | them with a counter. llvm-svn: 98462
* change EH related stuff (other than EH_LABEL) to use MCSymbolChris Lattner2010-03-141-20/+26
| | | | | | | | | | | | | | | | instead of label ID's. This cleans up and regularizes a bunch of code and makes way for future progress. Unfortunately, this pointed out to me that JITDwarfEmitter.cpp is largely copy and paste from DwarfException/MachineModuleInfo and other places. This is very sad and disturbing. :( One major change here is that TidyLandingPads moved from being called in DwarfException::BeginFunction to being called in DwarfException::EndFunction. There should not be any functionality change from doing this, but I'm not an EH expert. llvm-svn: 98459
* rearrange MCContext ownership. Before LLVMTargetMachine created it Chris Lattner2010-03-131-8/+12
| | | | | | | | | | | and passing off ownership to AsmPrinter. Now MachineModuleInfo creates it and owns it by value. This allows us to use MCSymbols more consistently throughout the rest of the code generator, and simplifies a bit of code. This also allows MachineFunction to keep an MCContext reference handy, and cleans up the TargetRegistry interfaces for AsmPrinters. llvm-svn: 98450
* strength reduce MMI::MappedLabel to MMI::isLabelDeleted,Chris Lattner2010-03-091-7/+5
| | | | | | | and add a FIXME about how we are eventually going to zap this lookup table once mc world domination is complete. llvm-svn: 98031
* Fix an uninitialized value. Radar 7609421.Bob Wilson2010-02-061-0/+1
| | | | llvm-svn: 95488
* Update of 94055 to track the IR level call site information via an intrinsic.Jim Grosbach2010-01-281-0/+1
| | | | | | | This allows code gen and the exception table writer to cooperate to make sure landing pads are associated with the correct invoke locations. llvm-svn: 94726
* back this out for now. Growing Function is not good.Jim Grosbach2010-01-211-1/+0
| | | | llvm-svn: 94097
* Make sure that landing pad entries in the EH call site table are in the properJim Grosbach2010-01-211-0/+1
| | | | | | order for SjLj style exception handling. llvm-svn: 94055
* Remove DebugLabelFolder pass. It is not used by dwarf writer anymore.Devang Patel2009-11-241-72/+0
| | | | llvm-svn: 89790
* "Attach debug info with llvm instructions" mode was enabled a month ago. Now ↵Devang Patel2009-11-121-2/+0
| | | | | | make it permanent and remove old way of inserting intrinsics to encode debug info for line number and scopes. llvm-svn: 87014
* Clear variable debug info map at the end of the function.Devang Patel2009-10-081-0/+3
| | | | llvm-svn: 83571
* Simplify.Devang Patel2009-09-301-6/+0
| | | | llvm-svn: 83123
* the pointer MMI keeps will start out with object-file format specific stuffChris Lattner2009-09-161-2/+2
| | | | llvm-svn: 82012
* add hooks to hang target-specific goop off MachineModuleInfo,Chris Lattner2009-09-151-7/+7
| | | | | | | move MachineFunctionInfo virtual method out of line to give it a home. llvm-svn: 81940
* Rework getPersonalityIndex slightly - 0 is now a valid and not-NULLEric Christopher2009-08-261-3/+3
| | | | | | personality function. llvm-svn: 80153
* If we're emitting additional CIEs due to personality functionsEric Christopher2009-08-261-2/+7
| | | | | | | don't emit the default one. Explicitly check for the NULL CIE later. llvm-svn: 80146
* Nuke trailing whitespace.Eric Christopher2009-08-261-14/+13
| | | | llvm-svn: 80145
* remove some uses of llvm/Support/Streams.hChris Lattner2009-08-231-1/+0
| | | | llvm-svn: 79842
* Use setPreservesAll and setPreservesCFG in CodeGen passes.Dan Gohman2009-07-311-0/+1
| | | | llvm-svn: 77754
* implement a new magic global "llvm.compiler.used" which is like llvm.used, butChris Lattner2009-07-201-1/+2
| | | | | | doesn't cause ".no_dead_strip" to be emitted on darwin. llvm-svn: 76399
* use stripPointerCasts to simplify some code.Chris Lattner2009-07-201-6/+4
| | | | llvm-svn: 76397
* llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.Torok Edwin2009-07-141-1/+1
| | | | | | | | | This adds location info for all llvm_unreachable calls (which is a macro now) in !NDEBUG builds. In NDEBUG builds location info and the message is off (it only prints "UREACHABLE executed"). llvm-svn: 75640
* assert(0) -> LLVM_UNREACHABLE.Torok Edwin2009-07-111-1/+2
| | | | | | | | | Make llvm_unreachable take an optional string, thus moving the cerr<< out of line. LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for NDEBUG builds. llvm-svn: 75379
* DebugLabelFolder ruthlessly deletes redundant labels. However, sometimes the ↵Devang Patel2009-04-101-1/+1
| | | | | | redundant labels is referenced by debug info somewhere else. This patch provies a way so that dwarf writer can mark labels as used. llvm-svn: 68813
OpenPOWER on IntegriCloud