Duncan Sands
28bf7ac219
Fix long double support on x86-32 linux.
...
llvm-svn: 45701
2008-01-07 13:44:22 +00:00
Gordon Henriksen
24db8d383d
Pruning includes.
...
llvm-svn: 45700
2008-01-07 13:30:38 +00:00
Bill Wendling
a3bdad153f
Operand 1 should be a register. We don't care if it's a preg, vreg, or 0.
...
llvm-svn: 45699
2008-01-07 08:05:29 +00:00
Chris Lattner
d7857eafd0
add a note
...
llvm-svn: 45698
2008-01-07 07:46:23 +00:00
Chris Lattner
f3efadcb5b
remove #includage
...
llvm-svn: 45697
2008-01-07 07:42:25 +00:00
Chris Lattner
69fc766f63
split TargetInstrDesc out into its own header file.
...
llvm-svn: 45696
2008-01-07 07:33:08 +00:00
Chris Lattner
03ad885039
rename TargetInstrDescriptor -> TargetInstrDesc.
...
Make MachineInstr::getDesc return a reference instead
of a pointer, since it can never be null.
llvm-svn: 45695
2008-01-07 07:27:27 +00:00
Chris Lattner
3ef160b15a
remove a dead method.
...
llvm-svn: 45694
2008-01-07 06:47:10 +00:00
Chris Lattner
fd2e338b85
simplify some code.
...
llvm-svn: 45693
2008-01-07 06:47:00 +00:00
Chris Lattner
e99a6caee4
Rename all the M_* flags to be namespace qualified enums, and switch
...
all clients over to using predicates instead of these flags directly.
These are now private values which are only to be used to statically
initialize the tables.
llvm-svn: 45692
2008-01-07 06:42:05 +00:00
Chris Lattner
d004f54155
use predicate.
...
llvm-svn: 45691
2008-01-07 06:37:29 +00:00
Chris Lattner
08a69ac2f5
add more and significantly better comments to the rest of the machineinstr
...
flags that can be set. Add predicates for the ones lacking it, and switch
some clients over to using the predicates instead of Flags directly.
llvm-svn: 45690
2008-01-07 06:21:53 +00:00
Chris Lattner
769c86bf63
simplify some code using new predicates
...
llvm-svn: 45689
2008-01-07 05:40:58 +00:00
Chris Lattner
c5c63ff9d7
add some mroe comments, add a isImplicitDef() method, add
...
isConditionalBranch() and isUnconditionalBranch() methods.
llvm-svn: 45688
2008-01-07 05:38:38 +00:00
Chris Lattner
f376c99ea0
rename hasVariableOperands() -> isVariadic(). Add some comments.
...
Evan, please review the comments I added to getNumDefs to make sure
that they are accurate, thx.
llvm-svn: 45687
2008-01-07 05:19:29 +00:00
Chris Lattner
fd548c96cc
Move M_* flags down in the file. Move SchedClass up in the
...
TargetInstrDescriptor class and shrink to 16-bits, saving a
word in TargetInstrDescriptor. Add some comments.
llvm-svn: 45686
2008-01-07 05:06:49 +00:00
Chris Lattner
8c69898157
remove a dead field.
...
llvm-svn: 45685
2008-01-07 04:57:42 +00:00
Chris Lattner
6f8713decb
the name field of instructions is never set to a non-empty string,
...
just unconditionally use the def name of the instruction.
llvm-svn: 45684
2008-01-07 04:57:31 +00:00
Chris Lattner
6077962101
no need to explicitly clear these fields.
...
llvm-svn: 45683
2008-01-07 04:55:09 +00:00
Nate Begeman
f7c3ff6f80
Fix typo
...
llvm-svn: 45682
2008-01-07 04:01:26 +00:00
Gordon Henriksen
c75405bdb3
Removing a leaked file.
...
llvm-svn: 45681
2008-01-07 03:23:52 +00:00
Chris Lattner
b0d06b4381
Move a bunch more accessors from TargetInstrInfo to TargetInstrDescriptor
...
llvm-svn: 45680
2008-01-07 03:13:06 +00:00
Chris Lattner
f0f438a517
remove MachineOpCode typedef.
...
llvm-svn: 45679
2008-01-07 02:48:55 +00:00
Chris Lattner
d34c47653e
remove some uses of MachineOpCode, move getSchedClass
...
into TargetInstrDescriptor from TargetInstrInfo.
llvm-svn: 45678
2008-01-07 02:46:03 +00:00
Chris Lattner
e55e115616
Add predicates methods to TargetOperandInfo, and switch all clients
...
over to using them, instead of diddling Flags directly. Change the
various flags from const variables to enums.
llvm-svn: 45677
2008-01-07 02:39:19 +00:00
Gordon Henriksen
c7e991b7c3
Setting GlobalDirective in TargetAsmInfo by default rather than
...
providing a misleading facility. It's used once in the MIPS backend
and hardcoded as "\t.globl\t" everywhere else.
llvm-svn: 45676
2008-01-07 02:31:11 +00:00
Gordon Henriksen
efb08802ec
Deleting an empty file. Thanks, /usr/bin/patch!
...
llvm-svn: 45675
2008-01-07 02:29:04 +00:00
Chris Lattner
a98c679de0
Rename MachineInstr::getInstrDescriptor -> getDesc(), which reflects
...
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
2008-01-07 01:56:04 +00:00
Owen Anderson
0ec92e9d64
Update CodeGen for MRegisterInfo --> TargetInstrInfo changes.
...
llvm-svn: 45673
2008-01-07 01:35:56 +00:00
Owen Anderson
2a3be7bb6c
Move even more functionality from MRegisterInfo into TargetInstrInfo.
...
Some day I'll get it all moved over...
llvm-svn: 45672
2008-01-07 01:35:02 +00:00
Gordon Henriksen
2d684b1fbf
Ammending r45669 with a missing file.
...
llvm-svn: 45671
2008-01-07 01:33:09 +00:00
Gordon Henriksen
6047b6e140
With this patch, the LowerGC transformation becomes the
...
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
2008-01-07 01:30:53 +00:00
Gordon Henriksen
5180e85675
Enabling the target-independent garbage collection infrastructure by hooking it
...
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
2008-01-07 01:30:38 +00:00
Chris Lattner
b296b0f1c1
The pic base can't be duplicated.
...
llvm-svn: 45668
2008-01-06 23:49:32 +00:00
Chris Lattner
a4ce4f6987
rename isLoad -> isSimpleLoad due to evan's desire to have such a predicate.
...
llvm-svn: 45667
2008-01-06 23:38:27 +00:00
Chris Lattner
4d3b0f579c
rearrange some code.
...
llvm-svn: 45666
2008-01-06 22:50:31 +00:00
Chris Lattner
e2949f42d3
some simplifications/cleanups to ?: sema.
...
llvm-svn: 45665
2008-01-06 22:42:25 +00:00
Chris Lattner
cfb6f430b6
Emit warnings like "dereferencing void pointer" instead of trying to
...
pretty print the type name for void.
llvm-svn: 45664
2008-01-06 22:21:46 +00:00
Gordon Henriksen
db911e9037
Modify Makefile.rules to allow makefiles to prepend to C.Flags and
...
fiends. Change Makefile.ocaml to not touch CFLAGS.
llvm-svn: 45663
2008-01-06 21:54:35 +00:00
Chris Lattner
2a1993fb2c
improve description of alignment, patch by Alain Frisch.
...
llvm-svn: 45662
2008-01-06 21:04:43 +00:00
Chris Lattner
ec56402557
Fix typo noticed by 'Danny' in PR1901
...
llvm-svn: 45661
2008-01-06 19:51:52 +00:00
Chris Lattner
466e8ebcc7
back out accidental commit.
...
llvm-svn: 45660
2008-01-06 19:19:32 +00:00
Chris Lattner
460d863ba5
fix an accidental commit that broke all the testers :(
...
llvm-svn: 45659
2008-01-06 19:18:52 +00:00
Duncan Sands
404eb05247
The transform that tries to turn calls to bitcast functions into
...
direct calls bails out unless caller and callee have essentially
equivalent parameter attributes. This is illogical - the callee's
attributes should be of no relevance here. Rework the logic, which
incidentally fixes a crash when removed arguments have attributes.
llvm-svn: 45658
2008-01-06 18:27:01 +00:00
Duncan Sands
55e5090fe8
When transforming a call to a bitcast function into
...
a direct call with cast parameters and cast return
value (if any), instcombine was prepared to cast any
non-void return value into any other, whether castable
or not. Add a new predicate for testing whether casting
is valid, and check it both for the return value and
(as a cleanup) for the parameters.
llvm-svn: 45657
2008-01-06 10:12:28 +00:00
Chris Lattner
10324d0175
rename isStore -> mayStore to more accurately reflect what it captures.
...
llvm-svn: 45656
2008-01-06 08:36:04 +00:00
Duncan Sands
1694a53c5d
Remove an unused variable.
...
llvm-svn: 45655
2008-01-06 07:43:13 +00:00
Chris Lattner
a348f55ec6
Change the 'isStore' inferrer to look for 'SDNPMayStore'
...
instead of "ISD::STORE". This allows us to mark target-specific dag
nodes as storing (such as ppc byteswap stores). This allows us to remove
more explicit isStore flags from the .td files.
Finally, add a warning for when a .td file contains an explicit
isStore and tblgen is able to infer it.
llvm-svn: 45654
2008-01-06 06:44:58 +00:00
Chris Lattner
f4d55ec4e8
remove explicit isStore flags that are now inferrable.
...
llvm-svn: 45653
2008-01-06 05:55:01 +00:00
Chris Lattner
e20f380fbf
remove some isStore flags that are now inferred automatically.
...
llvm-svn: 45652
2008-01-06 05:53:26 +00:00