summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC
Commit message (Collapse)AuthorAgeFilesLines
* Various bits of framework needed for precise machine-level selectionAndrew Trick2010-12-245-13/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | DAG scheduling during isel. Most new functionality is currently guarded by -enable-sched-cycles and -enable-sched-hazard. Added InstrItineraryData::IssueWidth field, currently derived from ARM itineraries, but could be initialized differently on other targets. Added ScheduleHazardRecognizer::MaxLookAhead to indicate whether it is active, and if so how many cycles of state it holds. Added SchedulingPriorityQueue::HasReadyFilter to allowing gating entry into the scheduler's available queue. ScoreboardHazardRecognizer now accesses the ScheduleDAG in order to get information about it's SUnits, provides RecedeCycle for bottom-up scheduling, correctly computes scoreboard depth, tracks IssueCount, and considers potential stall cycles when checking for hazards. ScheduleDAGRRList now models machine cycles and hazards (under flags). It tracks MinAvailableCycle, drives the hazard recognizer and priority queue's ready filter, manages a new PendingQueue, properly accounts for stall cycles, etc. llvm-svn: 122541
* whitespaceAndrew Trick2010-12-245-158/+158
| | | | llvm-svn: 122539
* Flag -> Glue, the ongoing sagaChris Lattner2010-12-231-20/+20
| | | | llvm-svn: 122513
* flags -> glue for selectiondagChris Lattner2010-12-231-2/+2
| | | | llvm-svn: 122509
* Change all self assignments X=X to (void)X, so that we can turn on aJeffrey Yasskin2010-12-231-1/+0
| | | | | | | new gcc warning that complains on self-assignments and self-initializations. llvm-svn: 122458
* rename MVT::Flag to MVT::Glue. "Flag" is a terrible name forChris Lattner2010-12-212-19/+19
| | | | | | | something that just glues two nodes together, even if it is sometimes used for flags. llvm-svn: 122310
* Restore the behavior of frame lowering before my refactoring.Anton Korobeynikov2010-12-184-12/+29
| | | | | | | | It turns out that ppc backend has really weird interdependencies over different hooks and all stuff is fragile wrt small changes. This should fix PR8749 llvm-svn: 122155
* Remove the MCObjectFormat class.Rafael Espindola2010-12-181-6/+0
| | | | llvm-svn: 122147
* MC/Target: Remove HasScatteredSymbols target hook variable, which has beenDaniel Dunbar2010-12-171-3/+1
| | | | | | superceded and was effectively dead. llvm-svn: 122024
* MC/Mach-O: Lift some MachObjectWriter arguments into the target specificDaniel Dunbar2010-12-161-6/+10
| | | | | | interface. llvm-svn: 121981
* MC/Mach-O: Stub out explicit MCMachObjectTargetWriter interface.Daniel Dunbar2010-12-161-1/+5
| | | | llvm-svn: 121973
* Fix indentation (per style guide).Daniel Dunbar2010-12-161-49/+49
| | | | llvm-svn: 121972
* MC/Mach-O: Move createMachObjectWriter into MCMachObjectWriter.h.Daniel Dunbar2010-12-161-0/+1
| | | | llvm-svn: 121971
* MC: Move target specific fixup info descriptors to TargetAsmBackend instead ofDaniel Dunbar2010-12-162-20/+20
| | | | | | | the MCCodeEmitter, which seems like a better organization. - Also, cleaned up some magic constants while in the area. llvm-svn: 121953
* Remove the instruction fragment to data fragment lowering since it was causingRafael Espindola2010-12-061-1/+1
| | | | | | freed data to be read. I will open a bug to track it being reenabled. llvm-svn: 121028
* Second try at making direct object emission produce the same resultsRafael Espindola2010-12-061-3/+0
| | | | | | | as llc + llvm-mc. This time ELF is not changed and I tested that llvm-gcc bootstrap on darwin10 using darwin9's assembler and linker. llvm-svn: 121006
* There are two reasons why we might want to useRafael Espindola2010-12-041-0/+4
| | | | | | | | | | | | | | | | foo = a - b .long foo instead of just .long a - b First, on darwin9 64 bits the assembler produces the wrong result. Second, if "a" is the end of the section all darwin assemblers (9, 10 and mc) will not consider a - b to be a constant but will if the dummy foo is created. Split how we handle these cases. The first one is something MC should take care of. The second one has to be handled by the caller. llvm-svn: 120889
* I swear I did a make clean and make before committing all this...Michael J. Spencer2010-11-291-1/+1
| | | | llvm-svn: 120304
* Move more PEI-related hooks to TFIAnton Korobeynikov2010-11-274-278/+271
| | | | llvm-svn: 120229
* MC/Mach-O: Switch to using MachOFormat.h.Daniel Dunbar2010-11-271-4/+4
| | | | | | - I'm leaving MachO.h, because I believe it has external consumers, but I would really like to eliminate it (we have stylistic disagreements with one another). llvm-svn: 120187
* Remove the unused TheTarget member.Rafael Espindola2010-11-261-1/+2
| | | | llvm-svn: 120168
* Namespacify.Benjamin Kramer2010-11-251-1/+1
| | | | llvm-svn: 120146
* Renaming ISD::BIT_CONVERT to ISD::BITCAST to better reflect the LLVM IR concept.Wesley Peck2010-11-232-92/+91
| | | | llvm-svn: 119990
* Move getInitialFrameState() to TargetFrameInfoAnton Korobeynikov2010-11-184-9/+8
| | | | llvm-svn: 119754
* Move hasFP() and few related hooks to TargetFrameInfo.Anton Korobeynikov2010-11-185-57/+54
| | | | llvm-svn: 119740
* make isVirtualSection a virtual method on MCSection. Chris' suggestion.Rafael Espindola2010-11-171-7/+0
| | | | llvm-svn: 119547
* Fix a bug I introduced in the ppc refactoring, which caused longChris Lattner2010-11-161-0/+1
| | | | | | | | | | branches to be emitted as: bne cr0, 2 instead of: bne cr0, $+8 llvm-svn: 119317
* add copy of comment to the code that will survive the mcjit'izationChris Lattner2010-11-161-0/+2
| | | | llvm-svn: 119308
* relax an assertion a bit, allowing the GPR argument ofChris Lattner2010-11-162-2/+6
| | | | | | | | these instructions to be encoded with getMachineOpValue. This unbreaks ExecutionEngine/2003-01-04-ArgumentBug.ll when running on a G5 llvm-svn: 119307
* fix a pasto that massively broke the ppc jit while the buildbots happenedChris Lattner2010-11-151-2/+2
| | | | | | to be broken for other reasons llvm-svn: 119283
* Wire up primitive support in the assembler backend for writing .o filesChris Lattner2010-11-155-1/+137
| | | | | | | | | | | | | | directly on the mac. This is very early, doesn't support relocations and has a terrible hack to avoid .machine from being printed, but despite that it generates an bitwise-identical-to-cctools .o file for stuff like this: define i32 @test() nounwind { ret i32 42 } I don't plan to continue pushing this forward, but if anyone else was interested in doing it, it should be really straight-forward. llvm-svn: 119136
* split out an encoder for memri operands, allowing a relocation to be ploppedChris Lattner2010-11-155-58/+68
| | | | | | | | | | | | | | | | into the immediate field. This allows us to encode stuff like this: lbz r3, lo16(__ZL4init)(r4) ; globalopt.cpp:5 ; encoding: [0x88,0x64,A,A] ; fixup A - offset: 0, value: lo16(__ZL4init), kind: fixup_ppc_lo16 stw r3, lo16(__ZL1s)(r5) ; globalopt.cpp:6 ; encoding: [0x90,0x65,A,A] ; fixup A - offset: 0, value: lo16(__ZL1s), kind: fixup_ppc_lo16 With this, we should have a completely function MCCodeEmitter for PPC, wewt. llvm-svn: 119134
* add support for encoding the lo14 forms used for a few PPC64 addressingChris Lattner2010-11-155-25/+45
| | | | | | | | | modes. For example, we now get: ld r3, lo16(_G)(r3) ; encoding: [0xe8,0x63,A,0bAAAAAA00] ; fixup A - offset: 0, value: lo16(_G), kind: fixup_ppc_lo14 llvm-svn: 119133
* fix a regression with the new instprinter: we lost the ability toChris Lattner2010-11-151-0/+22
| | | | | | | print DBG_VALUE instructions. This should unbreak the llvm-gcc-powerpc-darwin9 buildbot. llvm-svn: 119132
* implement the start of support for lo16 and ha16, allowing us to get stuff like:Chris Lattner2010-11-155-30/+108
| | | | | | | lis r4, ha16(__ZL4init) ; encoding: [0x3c,0x80,A,A] ; fixup A - offset: 0, value: ha16(__ZL4init), kind: fixup_ppc_ha16 llvm-svn: 119127
* add a fixup for conditional branches, giving us output like this:Chris Lattner2010-11-152-8/+11
| | | | | | | beq cr0, LBB0_4 ; encoding: [0x41,0x82,A,0bAAAAAA00] ; fixup A - offset: 0, value: LBB0_4, kind: fixup_ppc_brcond14 llvm-svn: 119126
* change direct branches to encode with the same encoding methodChris Lattner2010-11-153-23/+38
| | | | | | | | as direct calls. Change conditional branches to encode with their own method, simplifying the JIT encoder and making room for adding an mc fixup. llvm-svn: 119125
* eliminate a now-unneeded operand printer.Chris Lattner2010-11-152-4/+0
| | | | llvm-svn: 119124
* split call operands out to their own encoding class, simplifyingChris Lattner2010-11-154-77/+130
| | | | | | | | | | code in the JIT. Use this to form the first fixup for the PPC backend, giving us stuff like this: bl L_foo$stub ; encoding: [0b010010AA,A,A,0bAAAAAA01] ; fixup A - offset: 0, value: L_foo$stub, kind: fixup_ppc_br24 llvm-svn: 119123
* add proper encoding for MTCRF instead of using a hack.Chris Lattner2010-11-153-15/+37
| | | | llvm-svn: 119121
* add basic encoding support for immediates and registers, allowing us Chris Lattner2010-11-152-4/+8
| | | | | | | | | | to encode all of these instructions correctly (for example): mflr r0 ; encoding: [0x7c,0x08,0x02,0xa6] stw r0, 8(r1) ; encoding: [0x90,0x01,0x00,0x08] stwu r1, -64(r1) ; encoding: [0x94,0x21,0xff,0xc0] llvm-svn: 119118
* add a dummy entry to fix a build errorChris Lattner2010-11-151-2/+2
| | | | llvm-svn: 119117
* Implement a basic MCCodeEmitter for PPC. This doesn't handleChris Lattner2010-11-155-2/+113
| | | | | | | | | | | | | | | | fixups yet, and doesn't handle actually encoding operand values, but this is enough for llc -show-mc-encoding to show the base instruction encoding information, e.g.: mflr r0 ; encoding: [0x7c,0x08,0x02,0xa6] stw r0, 8(r1) ; encoding: [0x90,0x00,0x00,0x00] stwu r1, -64(r1) ; encoding: [0x94,0x00,0x00,0x00] Ltmp0: lhz r4, 4(r3) ; encoding: [0xa0,0x00,0x00,0x00] cmplwi cr0, r4, 8 ; encoding: [0x28,0x00,0x00,0x00] beq cr0, LBB0_2 ; encoding: [0x40,0x00,0x00,0x00] llvm-svn: 119116
* dissolve some more hacks.Chris Lattner2010-11-152-6/+6
| | | | llvm-svn: 119115
* fix some fixme's, removing dead code.Chris Lattner2010-11-151-8/+2
| | | | llvm-svn: 119114
* remove asmstrings (which can never be printed) from pseudo Chris Lattner2010-11-154-103/+48
| | | | | | | instructions, allowing is to eliminate some dead operand printing methods from the instprinter. llvm-svn: 119113
* strength reduce TOC temp label generation, no functionality change.Chris Lattner2010-11-151-7/+4
| | | | llvm-svn: 119112
* rip out a ton of old instruction printing junk now that theChris Lattner2010-11-151-419/+86
| | | | | | new instprinting logic is there. llvm-svn: 119111
* Turn on the new instprinter by default.Chris Lattner2010-11-151-1/+1
| | | | | | | | | | | | | | The only change in the output is: 1) we get a better comment on mfcr, we get: mfcr r2 ; cr2 instead of: mfcr r2 ; 32 2) we no longer emit $stub's on powerpc/leopard. The Leopard linker autosynthesizes them. llvm-svn: 119108
* convert the operand bits into bitfields since they are all combinable inChris Lattner2010-11-153-116/+92
| | | | | | | | | different ways. Add $non_lazy_ptr support, and proper lowering for global values. Now all the ppc regression tests pass with the new instruction printer. llvm-svn: 119106
OpenPOWER on IntegriCloud