summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Remove Value::{isName, getNameRef}.Daniel Dunbar2009-07-251-1/+1
| | | | | | Also, change MDString to use a StringRef. llvm-svn: 77098
* this is (unfortunately) several changes mixed together:Chris Lattner2009-07-251-1/+1
| | | | | | | | | | | | | | 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
* Convert a few more things to use raw_ostream.Dan Gohman2009-07-252-26/+27
| | | | llvm-svn: 77039
* More migration to raw_ostream, the water has dried up around the iostream hole.Daniel Dunbar2009-07-2516-86/+101
| | | | | | | | | | - 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. llvm-svn: 77019
* Revert the ConstantInt constructors back to their 2.5 forms where possible, ↵Owen Anderson2009-07-246-44/+44
| | | | | | thanks to contexts-on-types. More to come. llvm-svn: 77011
* Add support for promoting SETCC operations.Jakob Stoklund Olesen2009-07-244-13/+20
| | | | llvm-svn: 76987
* remove a use of SectionFlagsForGlobal.Chris Lattner2009-07-241-3/+4
| | | | llvm-svn: 76970
* More move to raw_ostream.Daniel Dunbar2009-07-241-4/+3
| | | | llvm-svn: 76966
* Move more to raw_ostream, provide support for writing MachineBasicBlock,Daniel Dunbar2009-07-245-5/+45
| | | | | | LiveInterval, etc to raw_ostream. llvm-svn: 76965
* Move to raw_ostream.Daniel Dunbar2009-07-242-38/+39
| | | | llvm-svn: 76963
* Switch to getNameStr().Daniel Dunbar2009-07-244-13/+13
| | | | llvm-svn: 76962
* document SectionFlags::Named better and make it more easily greppable byChris Lattner2009-07-241-1/+1
| | | | | | eliminating isNamed. llvm-svn: 76946
* "fix" PR4612, which is a crash on:Chris Lattner2009-07-231-1/+5
| | | | | | | | | | %0 = malloc [3758096384 x i32] The "malloc" instruction doesn't support 64-bits correctly (see PR715), and should be removed. Victor is actively working on fixing this, in the meantime just don't crash. llvm-svn: 76899
* Convert StringMap to using StringRef for its APIs.Daniel Dunbar2009-07-231-6/+3
| | | | | | | | | | | | - Yay for '-'s and simplifications! - I kept StringMap::GetOrCreateValue for compatibility purposes, this can eventually go away. Likewise the StringMapEntry Create functions still follow the old style. - NIFC. llvm-svn: 76888
* For real this time: PHI Def & Kill tracking added to PHIElimination.Lang Hames2009-07-231-3/+5
| | | | llvm-svn: 76865
* Added PHI Def & Kill tracking to PHIElimination pass.Lang Hames2009-07-232-4/+56
| | | | llvm-svn: 76849
* Reorder if-else branches as suggested by Bill.David Greene2009-07-221-4/+4
| | | | llvm-svn: 76808
* Constify the key in Mi2IndexMap.David Greene2009-07-221-1/+1
| | | | llvm-svn: 76801
* Ignore undef uses.Evan Cheng2009-07-221-0/+3
| | | | llvm-svn: 76799
* Switch some clients to Value::getName(), and other getName() userDaniel Dunbar2009-07-221-2/+2
| | | | | | | simplification. - NFC llvm-svn: 76789
* Put comment printing under asm-verbose.David Greene2009-07-221-13/+36
| | | | llvm-svn: 76780
* Make some changes suggested by Bill and Evan.David Greene2009-07-222-34/+25
| | | | llvm-svn: 76775
* remove the SelectSectionForMachineConst hook, replacing it withChris Lattner2009-07-222-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
* Let each target determines whether a machine instruction is dead. If true, ↵Evan Cheng2009-07-222-25/+23
| | | | | | | | that allows late codeine passes to delete it. This is considered a workaround. The problem is some targets are not modeling side effects correctly. PPC is apparently one of those. This patch allows ppc llvm-gcc to bootstrap on Darwin. Once we find out which instruction definitions are wrong, we can remove the PPCInstrInfo workaround. llvm-svn: 76703
* Get rid of the Pass+Context magic.Owen Anderson2009-07-227-42/+42
| | | | llvm-svn: 76702
* reimplement Constant::ContainsRelocations as Chris Lattner2009-07-221-13/+1
| | | | | | | | | 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
* Exposed PHIElimination pass within CodeGen.Lang Hames2009-07-212-74/+101
| | | | llvm-svn: 76688
* Add some support for iterative coalescers to calculate a joined liveDavid Greene2009-07-212-2/+35
| | | | | | | | | | range's weight properly. This is turned off right now in the sense that you'll get an assert if you get into a situation that can only be caused by an iterative coalescer. All other code paths operate exactly as before so there is no functional change with this patch. The asserts should be disabled if/when an iterative coalescer gets added to trunk. llvm-svn: 76680
* no really, I can spell!Chris Lattner2009-07-211-2/+2
| | | | llvm-svn: 76679
* add an API so target-independent codegen can determine if a constantChris Lattner2009-07-211-1/+20
| | | | | | | | pool entry will require relocations against it. I implemented this conservatively for ARM, someone who is knowledgable about it should see if this can be improved. llvm-svn: 76678
* Change ELFCodeEmitter logic to emit the constant pool and jump tables toBruno Cardoso Lopes2009-07-212-27/+29
| | | | | | | | their appropriate sections before the code itself. They need to be emitted before the function because on some targets (x86 but not x86_64) the later may reference a JT or CP entry address llvm-svn: 76672
* revert r76602, 76603, and r76615, pending design discussions.Chris Lattner2009-07-213-11/+13
| | | | llvm-svn: 76646
* Remove shift amount flavor. It isn't actually complete enough to Eli Friedman2009-07-211-1/+0
| | | | | | | | be useful, and it's currently unused. (Some issues: it isn't actually rich enough to capture the semantics on many architectures, and semantics can vary depending on the type being shifted.) llvm-svn: 76633
* Prefix IR dumps with LiveInterval indices when possible. This turnsDavid Greene2009-07-211-9/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this: %ESI<def> = MOV32rr %EDI<kill> ADJCALLSTACKDOWN64 0, %RSP<imp-def>, %EFLAGS<imp-def,dead>, %RSP<imp-use> %reg1027<def> = MOVZX64rr32 %ESI %reg1027<def> = ADD64ri8 %reg1027, 15, %EFLAGS<imp-def,dead> %reg1027<def> = AND64ri8 %reg1027, -16, %EFLAGS<imp-def,dead> %RDI<def> = MOV64rr %RSP %RDI<def> = SUB64rr %RDI, %reg1027<kill>, %EFLAGS<imp-def,dead> %RSP<def> = MOV64rr %RDI into this: 4 %reg1024<def> = MOV32rr %EDI<kill> 12 ADJCALLSTACKDOWN64 0, %RSP<imp-def>, %EFLAGS<imp-def,dead>, %RSP<imp-use> 20 %reg1025<def> = MOVZX64rr32 %reg1024 28 %reg1026<def> = MOV64rr %reg1025<kill> 36 %reg1026<def> = ADD64ri8 %reg1026, 15, %EFLAGS<imp-def,dead> 44 %reg1027<def> = MOV64rr %reg1026<kill> 52 %reg1027<def> = AND64ri8 %reg1027, -16, %EFLAGS<imp-def,dead> 60 %reg1028<def> = MOV64rr %RSP 68 %reg1029<def> = MOV64rr %reg1028<kill> 76 %reg1029<def> = SUB64rr %reg1029, %reg1027<kill>, %EFLAGS<imp-def,dead> 84 %RSP<def> = MOV64rr %reg1029 This helps greatly when debugging register allocation and coalescing problems. llvm-svn: 76615
* make AsmPrinter::doFinalization iterate over the global variablesChris Lattner2009-07-211-0/+5
| | | | | | | and call PrintGlobalVariable, allowing elimination and simplification of various targets. llvm-svn: 76604
* Add PrefixPrinter arguments to the dump routines for MachineFunction andDavid Greene2009-07-212-4/+9
| | | | | | MachineBasicBlock. We'll use these shortly. llvm-svn: 76603
* Rename getConstantInt{True|False} to get{True|False} at Chris' behest.Owen Anderson2009-07-211-4/+4
| | | | llvm-svn: 76598
* Rename LessPrivateGlobalPrefix -> LinkerPrivateGlobalPrefix to match theChris Lattner2009-07-212-2/+3
| | | | | | LLVM IR concept. llvm-svn: 76590
* Another rewriter bug exposed by recent coalescer changes. ↵Evan Cheng2009-07-211-23/+27
| | | | | | ReuseInfo::GetRegForReload() should make sure the "switched" register is in the desired register class. I'm surprised this hasn't caused more failures in the past. llvm-svn: 76558
* Simplify / normalize some uses of Value::getName.Daniel Dunbar2009-07-211-1/+1
| | | | llvm-svn: 76553
* Support adding relocations for data sections, handling the cases whereBruno Cardoso Lopes2009-07-213-24/+57
| | | | | | | global declared symbols are initialized with references from other global symbols. llvm-svn: 76540
* Fix a dagga combiner bug: avoid creating illegal constant.Evan Cheng2009-07-211-9/+12
| | | | | | | | Is this really a winning transformation? fold (shl (srl x, c1), c2) -> (shl (and x, (shl -1, c1)), (sub c2, c1)) or (srl (and x, (shl -1, c1)), (sub c1, c2)) llvm-svn: 76535
* Move a bit more state over to the LLVMContext.Owen Anderson2009-07-211-4/+6
| | | | llvm-svn: 76533
* Cross RC coalescing is now on by default.Evan Cheng2009-07-211-4/+4
| | | | llvm-svn: 76519
* Move stripping of bitcasts in inline asm argumentsDale Johannesen2009-07-202-12/+7
| | | | | | | to a place where it affects everything. Occurs only on calls AFAIK. llvm-svn: 76502
* Simplify the code in DarwinTargetAsmInfo::emitUsedDirectiveFor so that ↵Bill Wendling2009-07-201-1/+0
| | | | | | humans can understand it. llvm-svn: 76480
* Pass in the unfortunately named "LessPrivatePrefix" for theBill Wendling2009-07-201-1/+2
| | | | | | | | "LinkerPrivatePrefix". It seems to have been used in only one place before I started this "linker_private" business. I'm thinking that a rename is in order... llvm-svn: 76479
* Use TII->findCommutedOpIndices to find the commute operands (rather than ↵Evan Cheng2009-07-201-4/+8
| | | | | | guessing). llvm-svn: 76472
* Fix some sub-reg coalescing bugs where the coalescer wasn't updating the ↵Evan Cheng2009-07-201-12/+18
| | | | | | resulting interval's register class. llvm-svn: 76458
* For PC relative relocations where symbols are defined in the same section theyBruno Cardoso Lopes2009-07-202-39/+56
| | | | | | | are referenced, ignore the relocation entry and patch the relocatable field with the computed symbol offset directly llvm-svn: 76414
OpenPOWER on IntegriCloud