aboutsummaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Make AliasAnalysis and related classes useDan Gohman2009-07-257-41/+45
| | | | | | | getAnalysisIfAvailable<TargetData>(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77028 91177308-0d34-0410-b5e6-96231b3b80d8
* Another TODO.Evan Cheng2009-07-251-0/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77026 91177308-0d34-0410-b5e6-96231b3b80d8
* Change Thumb2 jumptable codegen to one that uses two level jumps:Evan Cheng2009-07-2512-72/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before: adr r12, #LJTI3_0_0 ldr pc, [r12, +r0, lsl #2] LJTI3_0_0: .long LBB3_24 .long LBB3_30 .long LBB3_31 .long LBB3_32 After: adr r12, #LJTI3_0_0 add pc, r12, +r0, lsl #2 LJTI3_0_0: b.w LBB3_24 b.w LBB3_30 b.w LBB3_31 b.w LBB3_32 This has several advantages. 1. This will make it easier to optimize this to a TBB / TBH instruction + (smaller) table. 2. This eliminate the need for ugly asm printer hack to force the address into thumb addresses (bit 0 is one). 3. Same codegen for pic and non-pic. 4. This eliminate the need to align the table so constantpool island pass won't have to over-estimate the size. Based on my calculation, the later is probably slightly faster as well since ldr pc with shifter address is very slow. That is, it should be a win as long as the HW implementation can do a reasonable job of branch predict the second branch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77024 91177308-0d34-0410-b5e6-96231b3b80d8
* More migration to raw_ostream, the water has dried up around the iostream hole.Daniel Dunbar2009-07-2545-256/+302
| | | | | | | | | | | - Some clients which used DOUT have moved to DEBUG. We are deprecating the "magic" DOUT behavior which avoided calling printing functions when the statement was disabled. In addition to being unnecessary magic, it had the downside of leaving code in -Asserts builds, and of hiding potentially unnecessary computations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77019 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM code emitter can't handle Thumb2 instructions yet. So don't even try.Evan Cheng2009-07-251-4/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77018 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix build for GCC 4.0?Daniel Dunbar2009-07-241-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77016 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix compile with 4.4 (I hope?); PR4617.Daniel Dunbar2009-07-241-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77015 91177308-0d34-0410-b5e6-96231b3b80d8
* Forward-declare raw_ostream.Andreas Bolka2009-07-241-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77014 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert the ConstantInt constructors back to their 2.5 forms where possible, ↵Owen Anderson2009-07-2452-1179/+887
| | | | | | thanks to contexts-on-types. More to come. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77011 91177308-0d34-0410-b5e6-96231b3b80d8
* AliasAnalysis wants sizes in address-units, not bits.Dan Gohman2009-07-241-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77009 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix assert assembling zero-argument constant GEP.Eli Friedman2009-07-241-2/+3
| | | | | | | | | There's still a strict-aliasing violation here, but I don't feel like dealing with that right now... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77005 91177308-0d34-0410-b5e6-96231b3b80d8
* Uh. It would be useful to actually print the operand.Evan Cheng2009-07-241-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77004 91177308-0d34-0410-b5e6-96231b3b80d8
* fix some predicatesChris Lattner2009-07-241-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76999 91177308-0d34-0410-b5e6-96231b3b80d8
* change SectionKindForGlobal from being a public (andChris Lattner2009-07-241-17/+9
| | | | | | | | previously virtual) function to being a static function in the .cpp file. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76997 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable my constant island pass optimization (to make use soimm more ↵Evan Cheng2009-07-242-4/+7
| | | | | | effectively). It caused infinite looping on lencod. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76995 91177308-0d34-0410-b5e6-96231b3b80d8
* make SectionKindForGlobal target independent, and therefore non-virtual.Chris Lattner2009-07-244-51/+72
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76993 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a workaround for Darwin assembler bug where it's not setting the thumb ↵Evan Cheng2009-07-241-2/+20
| | | | | | bit in Thumb2 jumptable entries. We now pass Olden. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76991 91177308-0d34-0410-b5e6-96231b3b80d8
* we already know the sectionkind when invoking SelectSectionForGlobal,Chris Lattner2009-07-245-14/+14
| | | | | | | pass it in instead of recomputing it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76990 91177308-0d34-0410-b5e6-96231b3b80d8
* make SectionForGlobal non-virtual, add a hook for pic16 to do its "address=" ↵Chris Lattner2009-07-243-18/+30
| | | | | | hack. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76989 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix this condition I accidentally inverted.Dan Gohman2009-07-241-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76988 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for promoting SETCC operations.Jakob Stoklund Olesen2009-07-244-13/+20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76987 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure thumb2 jumptable entries are aligned.Evan Cheng2009-07-243-15/+19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76986 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean up.Evan Cheng2009-07-241-3/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76984 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace use of std::set with SmallPtrSet.Evan Cheng2009-07-241-3/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76983 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert several more passes to use getAnalysisIfAvailable<TargetData>()Dan Gohman2009-07-244-30/+31
| | | | | | | instead of getAnalysis<TargetData>(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76982 91177308-0d34-0410-b5e6-96231b3b80d8
* start refactoring pic16 section selection logic.Chris Lattner2009-07-242-16/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76977 91177308-0d34-0410-b5e6-96231b3b80d8
* move ELF-specific code into ELFTargetAsmInfo.Chris Lattner2009-07-242-25/+28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76976 91177308-0d34-0410-b5e6-96231b3b80d8
* tidy upChris Lattner2009-07-241-3/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76975 91177308-0d34-0410-b5e6-96231b3b80d8
* split the ELF-specific section flag inference-from-name code outChris Lattner2009-07-241-25/+32
| | | | | | | into its own helper function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76974 91177308-0d34-0410-b5e6-96231b3b80d8
* make SectionFlagsForGlobal a private static function instead of a publicChris Lattner2009-07-241-6/+6
| | | | | | | virtual one. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76973 91177308-0d34-0410-b5e6-96231b3b80d8
* move a method up in the file, GV is always non-null, so remove a check.Chris Lattner2009-07-241-61/+62
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76972 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76971 91177308-0d34-0410-b5e6-96231b3b80d8
* remove a use of SectionFlagsForGlobal.Chris Lattner2009-07-241-3/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76970 91177308-0d34-0410-b5e6-96231b3b80d8
* Another getName -> getNameStrDaniel Dunbar2009-07-241-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76967 91177308-0d34-0410-b5e6-96231b3b80d8
* More move to raw_ostream.Daniel Dunbar2009-07-241-4/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76966 91177308-0d34-0410-b5e6-96231b3b80d8
* Move more to raw_ostream, provide support for writing MachineBasicBlock,Daniel Dunbar2009-07-246-8/+51
| | | | | | | LiveInterval, etc to raw_ostream. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76965 91177308-0d34-0410-b5e6-96231b3b80d8
* Move more to raw_ostream.Daniel Dunbar2009-07-242-7/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76964 91177308-0d34-0410-b5e6-96231b3b80d8
* Move to raw_ostream.Daniel Dunbar2009-07-243-71/+73
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76963 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch to getNameStr().Daniel Dunbar2009-07-2411-35/+35
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76962 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow llvm_report_error to accept a Twine.Daniel Dunbar2009-07-241-3/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76961 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused member functions.Eli Friedman2009-07-2416-474/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76960 91177308-0d34-0410-b5e6-96231b3b80d8
* Update CMakeDaniel Dunbar2009-07-241-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76957 91177308-0d34-0410-b5e6-96231b3b80d8
* Add Twine ADT.Daniel Dunbar2009-07-241-0/+91
| | | | | | | - Not currently used. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76956 91177308-0d34-0410-b5e6-96231b3b80d8
* hoist section name uniquing logic up to the top-level SectionForGlobalChris Lattner2009-07-243-28/+26
| | | | | | | implementation, eliminating a dupe. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76953 91177308-0d34-0410-b5e6-96231b3b80d8
* reduce indentationChris Lattner2009-07-241-35/+37
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76951 91177308-0d34-0410-b5e6-96231b3b80d8
* simplify code by making special case more obviousChris Lattner2009-07-241-9/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76950 91177308-0d34-0410-b5e6-96231b3b80d8
* the 'isWeakForLinker' code is common between functions and globals, hoist itChris Lattner2009-07-241-55/+44
| | | | | | | and simplify some other code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76949 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace UniqueSectionForGlobal with getSectionPrefixForUniqueGlobal.Chris Lattner2009-07-245-60/+39
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76948 91177308-0d34-0410-b5e6-96231b3b80d8
* document SectionFlags::Named better and make it more easily greppable byChris Lattner2009-07-241-1/+1
| | | | | | | eliminating isNamed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76946 91177308-0d34-0410-b5e6-96231b3b80d8
* fix indentation.Chris Lattner2009-07-241-14/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76945 91177308-0d34-0410-b5e6-96231b3b80d8