- Jan 07, 2008
-
-
Chris Lattner authored
over to using them, instead of diddling Flags directly. Change the various flags from const variables to enums. llvm-svn: 45677
-
Gordon Henriksen authored
providing a misleading facility. It's used once in the MIPS backend and hardcoded as "\t.globl\t" everywhere else. llvm-svn: 45676
-
Chris Lattner authored
that it is cheap and efficient to get. Move a variety of predicates from TargetInstrInfo into TargetInstrDescriptor, which makes it much easier to query a predicate when you don't have TII around. Now you can use MI->getDesc()->isBranch() instead of going through TII, and this is much more efficient anyway. Not all of the predicates have been moved over yet. Update old code that used MI->getInstrDescriptor()->Flags to use the new predicates in many places. llvm-svn: 45674
-
Owen Anderson authored
llvm-svn: 45673
-
Gordon Henriksen authored
llvm-svn: 45671
-
Gordon Henriksen authored
ShadowStackCollector, which additionally has reduced overhead with no sacrifice in portability. Considering a function @fun with 8 loop-local roots, ShadowStackCollector introduces the following overhead (x86): ; shadowstack prologue movl L_llvm_gc_root_chain$non_lazy_ptr, %eax movl (%eax), %ecx movl $___gc_fun, 20(%esp) movl $0, 24(%esp) movl $0, 28(%esp) movl $0, 32(%esp) movl $0, 36(%esp) movl $0, 40(%esp) movl $0, 44(%esp) movl $0, 48(%esp) movl $0, 52(%esp) movl %ecx, 16(%esp) leal 16(%esp), %ecx movl %ecx, (%eax) ; shadowstack loop overhead (none) ; shadowstack epilogue movl 48(%esp), %edx movl %edx, (%ecx) ; shadowstack metadata .align 3 ___gc_fun: # __gc_fun .long 8 .space 4 In comparison to LowerGC: ; lowergc prologue movl L_llvm_gc_root_chain$non_lazy_ptr, %eax movl (%eax), %ecx movl %ecx, 48(%esp) movl $8, 52(%esp) movl $0, 60(%esp) movl $0, 56(%esp) movl $0, 68(%esp) movl $0, 64(%esp) movl $0, 76(%esp) movl $0, 72(%esp) movl $0, 84(%esp) movl $0, 80(%esp) movl $0, 92(%esp) movl $0, 88(%esp) movl $0, 100(%esp) movl $0, 96(%esp) movl $0, 108(%esp) movl $0, 104(%esp) movl $0, 116(%esp) movl $0, 112(%esp) ; lowergc loop overhead leal 44(%esp), %eax movl %eax, 56(%esp) leal 40(%esp), %eax movl %eax, 64(%esp) leal 36(%esp), %eax movl %eax, 72(%esp) leal 32(%esp), %eax movl %eax, 80(%esp) leal 28(%esp), %eax movl %eax, 88(%esp) leal 24(%esp), %eax movl %eax, 96(%esp) leal 20(%esp), %eax movl %eax, 104(%esp) leal 16(%esp), %eax movl %eax, 112(%esp) ; lowergc epilogue movl 48(%esp), %edx movl %edx, (%ecx) ; lowergc metadata (none) llvm-svn: 45670
-
Gordon Henriksen authored
up to the various compiler pipelines. This doesn't actually add support for any GC algorithms, which means it temporarily breaks a few tests. To be fixed shortly. llvm-svn: 45669
-
Chris Lattner authored
llvm-svn: 45667
-
- Jan 06, 2008
-
-
Chris Lattner authored
llvm-svn: 45656
-
Duncan Sands authored
llvm-svn: 45655
-
Chris Lattner authored
llvm-svn: 45637
-
- Jan 05, 2008
-
-
Nate Begeman authored
Don't overwrite a variable used by the fallthrough code path in this case. llvm-svn: 45630
-
Chris Lattner authored
llvm-svn: 45629
-
Chris Lattner authored
llvm-svn: 45625
-
Chris Lattner authored
llvm-svn: 45624
-
Chris Lattner authored
llvm-svn: 45617
-
Chris Lattner authored
llvm-svn: 45614
-
Owen Anderson authored
llvm-svn: 45608
-
- Jan 04, 2008
-
-
Bill Wendling authored
preserved. llvm-svn: 45596
-
Bill Wendling authored
llvm-svn: 45574
-
Bill Wendling authored
llvm-svn: 45573
-
Bill Wendling authored
llvm-svn: 45572
-
Bill Wendling authored
llvm-svn: 45571
-
Chris Lattner authored
It is missing validity checks, so it is known broken. However, it is powerful enough to compile this contrived code: void test1(int C, double A, double B, double *P) { double Tmp = A*A+B*B; *P = C ? Tmp : A; } into: _test1: movsd 8(%esp), %xmm0 cmpl $0, 4(%esp) je LBB1_2 # entry LBB1_1: # entry movsd 16(%esp), %xmm1 mulsd %xmm1, %xmm1 mulsd %xmm0, %xmm0 addsd %xmm1, %xmm0 LBB1_2: # entry movl 24(%esp), %eax movsd %xmm0, (%eax) ret instead of: _test1: movsd 16(%esp), %xmm0 mulsd %xmm0, %xmm0 movsd 8(%esp), %xmm1 movapd %xmm1, %xmm2 mulsd %xmm2, %xmm2 addsd %xmm0, %xmm2 cmpl $0, 4(%esp) je LBB1_2 # entry LBB1_1: # entry movapd %xmm2, %xmm1 LBB1_2: # entry movl 24(%esp), %eax movsd %xmm1, (%eax) ret woo. llvm-svn: 45570
-
Chris Lattner authored
llvm-svn: 45569
-
- Jan 02, 2008
-
-
Bill Wendling authored
llvm-svn: 45499
-
Bill Wendling authored
llvm-svn: 45496
-
Bill Wendling authored
instruction. Also, use "splice" to move the new instruction instead of remove/insert (where it was leaking memory anyway). llvm-svn: 45492
-
- Jan 01, 2008
-
-
Owen Anderson authored
llvm-svn: 45484
-
Chris Lattner authored
Make MachineRegisterInfo::getVRegDef more efficient by aiming the keep the def of the vreg at the start of the list, so the list doesn't need to be traversed. llvm-svn: 45483
-
Chris Lattner authored
it now returns the machineinstr of the use. To get the operand, use I.getOperand(). Add a new MachineRegisterInfo::replaceRegWith, which is basically like Value::replaceAllUsesWith. llvm-svn: 45482
-
Chris Lattner authored
instruction that defines the specified vreg. Crazy. llvm-svn: 45480
-
Chris Lattner authored
operands. The lists are currently kept in MachineRegisterInfo, but it does not yet provide an iterator interface to them. llvm-svn: 45477
-
Chris Lattner authored
a header file from libcodegen. This violates a layering order: codegen depends on target, not the other way around. The fix to this is to split TII into two classes, TII and TargetInstrInfoImpl, which defines stuff that depends on libcodegen. It is defined in libcodegen, where the base is not. llvm-svn: 45475
-
- Dec 31, 2007
-
-
Duncan Sands authored
values, which means doing extra legalization work. It would be easier to get this kind of thing right if there was some documentation... llvm-svn: 45472
-
Owen Anderson authored
Machine-level API cleanup instigated by Chris. llvm-svn: 45470
-
Chris Lattner authored
llvm-svn: 45469
-
Chris Lattner authored
llvm-svn: 45468
-
Chris Lattner authored
that "machine" classes are used to represent the current state of the code being compiled. Given this expanded name, we can start moving other stuff into it. For now, move the UsedPhysRegs and LiveIn/LoveOuts vectors from MachineFunction into it. Update all the clients to match. This also reduces some needless #includes, such as MachineModuleInfo from MachineFunction. llvm-svn: 45467
-
Chris Lattner authored
e.g. MO.isMBB() instead of MO.isMachineBasicBlock(). I don't plan on switching everything over, so new clients should just start using the shorter names. Remove old long accessors, switching everything over to use the short accessor: getMachineBasicBlock() -> getMBB(), getConstantPoolIndex() -> getIndex(), setMachineBasicBlock -> setMBB(), etc. llvm-svn: 45464
-