summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/TargetAsmInfo.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Rearrange all the SectionKinds and structure them into a hierarchicalChris Lattner2009-07-261-12/+14
| | | | | | | | | | | | | group instead of a bunch of random unrelated ideas. Provide predicates to categorize a SectionKind into a group, and use them instead of getKind() throughout the code. This also renames a ton of SectionKinds to be more consistent and evocative, and adds a huge number of comments on the enums so that I will hopefully be able to remember how this stuff works long from now. llvm-svn: 77129
* make SectionKind be a first-class pod struct instead of justChris Lattner2009-07-251-27/+31
| | | | | | an enum. llvm-svn: 77096
* this is (unfortunately) several changes mixed together:Chris Lattner2009-07-251-58/+27
| | | | | | | | | | | | | | 1. Spell SectionFlags::Writeable as "Writable". 2. Add predicates for deriving SectionFlags from SectionKinds. 3. Sink ELF-specific getSectionPrefixForUniqueGlobal impl into ELFTargetAsmInfo. 4. Fix SectionFlagsForGlobal to know that BSS/ThreadBSS has the BSS bit set (the real fix for PR4619). 5. Fix isSuitableForBSS to not put globals with explicit sections set in BSS (which was the reason #4 wasn't fixed earlier). 6. Remove my previous hack for PR4619. llvm-svn: 77085
* document some invariants.Chris Lattner2009-07-251-1/+6
| | | | llvm-svn: 77084
* add the most expedient hack to fix PR4619, along with a testcase.Chris Lattner2009-07-251-0/+5
| | | | | | Thanks to Rafael for the great example. llvm-svn: 77083
* fix some predicatesChris Lattner2009-07-241-1/+1
| | | | llvm-svn: 76999
* change SectionKindForGlobal from being a public (andChris Lattner2009-07-241-17/+9
| | | | | | | previously virtual) function to being a static function in the .cpp file. llvm-svn: 76997
* make SectionKindForGlobal target independent, and therefore non-virtual.Chris Lattner2009-07-241-20/+59
| | | | | | | | It's classifications now include elf-specific discriminators. Targets that don't have these features (like darwin and pecoff) simply treat data.rel like data, etc. llvm-svn: 76993
* we already know the sectionkind when invoking SelectSectionForGlobal,Chris Lattner2009-07-241-4/+3
| | | | | | pass it in instead of recomputing it. llvm-svn: 76990
* make SectionForGlobal non-virtual, add a hook for pic16 to do its "address=" ↵Chris Lattner2009-07-241-5/+12
| | | | | | hack. llvm-svn: 76989
* move ELF-specific code into ELFTargetAsmInfo.Chris Lattner2009-07-241-25/+1
| | | | llvm-svn: 76976
* tidy upChris Lattner2009-07-241-3/+4
| | | | llvm-svn: 76975
* split the ELF-specific section flag inference-from-name code outChris Lattner2009-07-241-25/+32
| | | | | | into its own helper function. llvm-svn: 76974
* make SectionFlagsForGlobal a private static function instead of a publicChris Lattner2009-07-241-6/+6
| | | | | | virtual one. llvm-svn: 76973
* move a method up in the file, GV is always non-null, so remove a check.Chris Lattner2009-07-241-61/+62
| | | | llvm-svn: 76972
* There is no need to pass the name into lib/Target/TargetAsmInfo.cppChris Lattner2009-07-241-1/+1
| | | | | | when we have a global with no section explicitly specified. llvm-svn: 76971
* Another getName -> getNameStrDaniel Dunbar2009-07-241-1/+1
| | | | llvm-svn: 76967
* hoist section name uniquing logic up to the top-level SectionForGlobalChris Lattner2009-07-241-14/+22
| | | | | | implementation, eliminating a dupe. llvm-svn: 76953
* Replace UniqueSectionForGlobal with getSectionPrefixForUniqueGlobal.Chris Lattner2009-07-241-26/+15
| | | | | | | | The later doesn't depend on any crazy LLVM IR stuff, and this pulls the concatenation of prefix with GV name (the root problem behind PR4584) out one level. llvm-svn: 76948
* reduce api exposure: clients shouldn't call SectionKindForGlobal directly.Chris Lattner2009-07-241-1/+1
| | | | llvm-svn: 76941
* remove more bits of small section support.Chris Lattner2009-07-241-3/+0
| | | | llvm-svn: 76937
* Remove SectionKind::Small*. This was only used on mips, and is apparentlyChris Lattner2009-07-241-12/+0
| | | | | | a sad mistake that is regretted. :) llvm-svn: 76935
* remove SectionFlags::Small: it is only used on Xcore, and we'll findChris Lattner2009-07-221-2/+1
| | | | | | a better solution for it in the future. llvm-svn: 76818
* Switch some clients to Value::getName(), and other getName() userDaniel Dunbar2009-07-221-13/+13
| | | | | | | simplification. - NFC llvm-svn: 76789
* Fix indentation.Daniel Dunbar2009-07-221-18/+19
| | | | llvm-svn: 76778
* remove the SelectSectionForMachineConst hook, replacing it withChris Lattner2009-07-221-3/+10
| | | | | | | | a new getSectionForMergableConstant hook. This removes one dependence of TAI on Type, and provides the hook with enough info to make the right decision based on whether the global has relocations etc. llvm-svn: 76705
* reimplement Constant::ContainsRelocations as Chris Lattner2009-07-221-2/+2
| | | | | | | | | Constant::getRelocationInfo(), which has a much simpler to use API. It still should not be part of libvmcore, but is better than it was. Also teach it to be smart about hidden visibility. llvm-svn: 76700
* simplify code now that it is inlined.Chris Lattner2009-07-211-12/+3
| | | | llvm-svn: 76689
* Now that RelocBehaviour() is never overloaded, it doesn't need to beChris Lattner2009-07-211-9/+3
| | | | | | | virtual. Just inline it into its two current call sites in preparation for simplifying the code. llvm-svn: 76686
* minor cleanups.Chris Lattner2009-07-211-16/+10
| | | | llvm-svn: 76645
* Rename LessPrivateGlobalPrefix -> LinkerPrivateGlobalPrefix to match theChris Lattner2009-07-211-1/+1
| | | | | | LLVM IR concept. llvm-svn: 76590
* fix indentationChris Lattner2009-07-211-16/+16
| | | | llvm-svn: 76587
* Re-apply 75490, 75806 and 76177 with fixes and tests. Efficiency comesDavid Greene2009-07-201-0/+2
| | | | | | next. llvm-svn: 76486
* Revert 76177 for now. It's messing up ARM asm printing. Also this ↵Evan Cheng2009-07-181-2/+0
| | | | | | significant debate about its efficiency. llvm-svn: 76279
* Untangle a snarl that I discovered when updating the mangler,Chris Lattner2009-07-171-1/+1
| | | | | | | | | | | | | | starting in getCurrentFunctionEHName. Among other problems, we would try to privative a "foo.eh" label, but end up emitting the label as _Lfoo.eh instead of L_foo.eh on darwin. This is really bad, and the linker has always tolerated these labels existing. For now, just emit them as _foo.eh. This patch also fixes problems with ".eh" labels on unnamed functions and eliminates two strangely defined TargetAsmInfo hooks. llvm-svn: 76231
* Add logic to align instruction operands to columns for pretty-printing.David Greene2009-07-171-0/+2
| | | | | | | No target uses this currently. This patch only adds the mechanism so that local installations can choose to enable this. llvm-svn: 76177
* Remove StringConstantPrefix now that the only userDuncan Sands2009-07-151-1/+0
| | | | | | (llvm-gcc) has gone. llvm-svn: 75781
* llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.Torok Edwin2009-07-141-2/+2
| | | | | | | | | 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
* As Chris pointed out, this doesn't actually need an LLVMContext to operate.Owen Anderson2009-07-131-3/+3
| | | | llvm-svn: 75508
* Add infrastructure to allow post instruction printing action triggers.David Greene2009-07-131-0/+1
| | | | | | | | | | | We'll eventually use this to print comments in asm files and do other fun things. This adds interfaces to the AsmPrinter and changes TableGen to invoke the postInstructionAction when appropriate. It also add parameters to TargetAsmInfo to control comment layout. llvm-svn: 75490
* Begin the painful process of tearing apart the rat'ss nest that is ↵Owen Anderson2009-07-131-3/+3
| | | | | | | | | Constants.cpp and ConstantFold.cpp. This involves temporarily hard wiring some parts to use the global context. This isn't ideal, but it's the only way I could figure out to make this process vaguely incremental. llvm-svn: 75445
* assert(0) -> LLVM_UNREACHABLE.Torok Edwin2009-07-111-2/+3
| | | | | | | | | 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
* merge the common darwin settings from the X86/PPC/ARM targetsChris Lattner2009-06-191-7/+2
| | | | | | | | into DarwinTargetAsmInfo.cpp. The remaining differences should be evaluated. It seems strange that x86/arm has .zerofill but ppc doesn't, etc. llvm-svn: 73742
* move mangler quote handling from asm printers to TargetAsmInfo.Chris Lattner2009-06-181-0/+1
| | | | llvm-svn: 73738
* simplify macro debug info directive handling.Chris Lattner2009-06-181-2/+1
| | | | llvm-svn: 73736
* Reapply 68847.Devang Patel2009-04-131-0/+2
| | | | | | Now debug_inlined section is covered by TAI->doesDwarfUsesInlineInfoSection(), which is false by default. llvm-svn: 68964
* Revert r68847. It breaks the build on non-Darwin targets, with this messageDan Gohman2009-04-111-1/+0
| | | | | | | from the assembler: Error: unknown pseudo-op: `.debug_inlined' llvm-svn: 68863
* Keep track of inlined functions and their locations. This information is ↵Devang Patel2009-04-111-0/+1
| | | | | | | | collected when nested llvm.dbg.func.start intrinsics are seen. (Right now, inliner removes nested llvm.dbg.func.start intrinisics during inlining.) Create debug_inlined dwarf section using these information. This info is used by gdb, at least on Darwin, to enable better experience debugging inlined functions. See DwarfWriter.cpp for more information on structure of debug_inlined section. llvm-svn: 68847
* Do not propagate ELF-specific stuff (data.rel) into other targets. This ↵Anton Korobeynikov2009-03-301-21/+6
| | | | | | simplifies code and also ensures correctness. llvm-svn: 68032
* Add data.rel stuffAnton Korobeynikov2009-03-301-8/+35
| | | | llvm-svn: 68031
OpenPOWER on IntegriCloud