Dan Gohman
d209911642
Use getValueOperand() and getPointerOperand() on load and store
...
instructions instead of hard-coding operand numbers.
llvm-svn: 118698
2010-11-10 19:03:33 +00:00
Duncan Sands
f3b1bf1606
Teach InstructionSimplify how to look through PHI nodes. Since PHI
...
nodes can be used in loops, this could result in infinite looping
if there is no recursion limit, so add such a limit. It is also
used for the SelectInst case because in theory there could be an
infinite loop there too if the basic block is unreachable.
llvm-svn: 118694
2010-11-10 18:23:01 +00:00
Dan Gohman
066c1bb1e9
Add a doesAccessArgPointees helper function, and update code to use
...
it, and to be consistent.
llvm-svn: 118692
2010-11-10 18:17:28 +00:00
Jim Grosbach
ca21cd749e
Simplify and clean up MC symbol lookup for ARM constant pool values. This fixes
...
double quoting of ObjC symbol names in constant pool entries.
rdar://8652107
llvm-svn: 118688
2010-11-10 17:59:10 +00:00
Dan Gohman
2577580967
Factor out the code for testing whether a function accesses
...
arbitrary memory into a helper function, and adjust some comments.
llvm-svn: 118687
2010-11-10 17:34:04 +00:00
Michael J. Spencer
b39a89716f
Fix Whitespace.
...
llvm-svn: 118683
2010-11-10 15:06:00 +00:00
Michael J. Spencer
909d238eba
System/Win32/Path: Implement isSymLink.
...
llvm-svn: 118681
2010-11-10 15:05:39 +00:00
Duncan Sands
b0579e9d3f
Simplify binary operations where one operand is a select instruction.
...
The simplifications performed here never create new instructions, they
only return existing instructions (or a constant), and so are always a
win. In theory they should transform (for example)
%z = and i32 %x, %y
%s = select i1 %cond, i32 %y, i32 %z
%r = and i32 %x, %s
into
%r = and i32 %x, y
but in practice they get into a fight with instcombine, and lose.
Unfortunately instcombine does a poor job in this case. Nonetheless
I'm committing this transform to make it easier to discuss what to
do to make peace with instcombine.
llvm-svn: 118679
2010-11-10 13:00:08 +00:00
NAKAMURA Takumi
23ebef1456
Win32/Process.inc: [PR8527] Process::FileDescriptorIsDisplayed(fd) should not check by FILE_TYPE_CHAR. It must be better to check it with Console API.
...
The special file "NUL" is FILE_TYPE_CHAR with GetFileType(h). It was treated as display device and discarding output to NUL had failed. (eg. opt -o nul)
llvm-svn: 118678
2010-11-10 08:37:47 +00:00
Jim Grosbach
f23b2d9d8d
Update ARMConstantPoolValue to not use a modifier string. Use an explicit
...
VariantKind marker to indicate the additional information necessary. Update
MC to handle the new Kinds. rdar://8647623
llvm-svn: 118671
2010-11-10 03:26:07 +00:00
Bruno Cardoso Lopes
67fc18a493
Add clo instruction. Patch by Akira Hatanaka (ahatanaka@mips.com) with some minor tweaks
...
llvm-svn: 118667
2010-11-10 02:13:22 +00:00
Dale Johannesen
0171dc30ff
When checking that the necessary bits are zero in
...
order to reduce ((x<<30)>>24) to x<<6, check the
correct bits. PR 8547.
llvm-svn: 118665
2010-11-10 01:30:56 +00:00
Bill Wendling
91607f878c
Emit a '!' if this is a "writeback" register or memory address.
...
llvm-svn: 118662
2010-11-10 01:07:54 +00:00
Jakob Stoklund Olesen
de5c4dc24b
Simplify the LiveRangeEdit::canRematerializeAt() interface a bit.
...
llvm-svn: 118661
2010-11-10 01:05:12 +00:00
Dan Gohman
2694e14087
Make ModRefBehavior a lattice. Use this to clean up AliasAnalysis
...
chaining and simplify FunctionAttrs' GetModRefBehavior logic.
llvm-svn: 118660
2010-11-10 01:02:18 +00:00
Matt Beaumont-Gay
55c4cc76ce
Rename a parameter to avoid confusion with a local variable
...
llvm-svn: 118656
2010-11-10 00:08:58 +00:00
Bill Wendling
e9a9c6da04
Emit the warning about the register list not being in ascending order only once.
...
llvm-svn: 118653
2010-11-09 23:45:59 +00:00
Rafael Espindola
9bb44a5ce8
Fixed version of 118639 with an extra assert to catch similar problems
...
earlier. Implicit bool -> int conversions are evil!
llvm-svn: 118651
2010-11-09 23:42:07 +00:00
Bill Wendling
bed9465a96
s/std::vector/SmallVector/
...
llvm-svn: 118648
2010-11-09 23:28:44 +00:00
Rafael Espindola
33048f069f
Revert previous patch. Missed a case.
...
llvm-svn: 118645
2010-11-09 22:54:38 +00:00
Bill Wendling
da3c0fbc64
Delete the allocated vector.
...
llvm-svn: 118644
2010-11-09 22:51:42 +00:00
Bob Wilson
d0046ca62d
Define the subtarget feature for the architecture version,
...
as derived from the target triple. This is important for enabling
features that are implied based on the architecture version.
llvm-svn: 118643
2010-11-09 22:50:47 +00:00
Bob Wilson
193722ebc8
Do not use MEMBARRIER_MCR for any Thumb code.
...
It is only supported for ARM code. Normally Thumb2 code would use DMB instead,
but depending on how the compiler is invoked (e.g., -mattr=-db) that might be
disabled. This prevents a "cannot select MEMBARRIER_MCR" error in that
situation. Radar 8644195
llvm-svn: 118642
2010-11-09 22:50:44 +00:00
Bill Wendling
2cae3277a5
Two types of instructions have register lists:
...
* LDM, et al, uses a bit mask to indicate the register list.
* VLDM, et al, uses a base register plus number.
The LDM instructions may be non-contiguous, but the VLDM ones must be
contiguous. Those are semantic checks that should be done later in the
compiler. Also postpone the creation of the bit mask until it's needed.
llvm-svn: 118640
2010-11-09 22:44:22 +00:00
Rafael Espindola
4bdd2724e3
Remove IsExplicit. It was always false.
...
llvm-svn: 118639
2010-11-09 22:37:44 +00:00
Jim Grosbach
a942ad4222
Change the ARMConstantPoolValue modifier string to an enumeration. This will
...
help in MC'izing the references that use them.
llvm-svn: 118633
2010-11-09 21:36:17 +00:00
Andrew Trick
488660554e
Adds RABasic verification and tracing.
...
(retry now that the windows build is green)
llvm-svn: 118630
2010-11-09 21:04:34 +00:00
Dan Gohman
e3467a7687
Teach FunctionAttrs about the VAArg instruction.
...
llvm-svn: 118627
2010-11-09 20:17:38 +00:00
Dan Gohman
35814e6128
Use the AliasAnalysis interface to determine how a Function accesses
...
memory. This isn't a real improvement with present day AliasAnalysis
implementations; it's mainly for consistency.
llvm-svn: 118624
2010-11-09 20:13:27 +00:00
Dan Gohman
88ff1ece63
VAArg doesn't capture its operand.
...
llvm-svn: 118623
2010-11-09 20:09:35 +00:00
Dan Gohman
5d06f892ef
Teach AliasAnalysis about AccessesArgumentsReadonly.
...
llvm-svn: 118621
2010-11-09 20:06:55 +00:00
Dan Gohman
0f17507478
Teach LICM and AliasSetTracker about AccessesArgumentsReadonly.
...
llvm-svn: 118618
2010-11-09 19:58:21 +00:00
Dan Gohman
de52155685
Teach FunctionAttrs about AccessesArgumentsReadonly.
...
llvm-svn: 118617
2010-11-09 19:56:27 +00:00
Matt Beaumont-Gay
7c1fddb531
Add a trivial virtual dtor to AbstractRegisterDescription to appease
...
-Wnon-virtual-dtor.
llvm-svn: 118616
2010-11-09 19:56:25 +00:00
Andrew Trick
42d50e920b
Reverting r118604. Windows build broke.
...
llvm-svn: 118613
2010-11-09 19:47:51 +00:00
Jim Grosbach
2fd4c37d8b
Handle ARM constant pool values that need an explicit reference to the '.'
...
pseudo-label. (TLS stuff).
llvm-svn: 118609
2010-11-09 19:40:22 +00:00
Chris Lattner
4d94e47368
add a case we fail to devirt.
...
llvm-svn: 118608
2010-11-09 19:37:28 +00:00
Jim Grosbach
68147ee320
Trailing whitespace.
...
llvm-svn: 118606
2010-11-09 19:22:26 +00:00
Andrew Trick
85064c17be
Adds RABasic verification and tracing.
...
llvm-svn: 118604
2010-11-09 19:01:17 +00:00
Jim Grosbach
38f8e76e51
Further MCize ARM constant pool values. This allows basic PIC references for
...
object file emission.
llvm-svn: 118601
2010-11-09 18:45:04 +00:00
Jim Grosbach
7e51095c23
Add encoding of Rt to ARM LDR/STR w/ reg+reg offset encoding.
...
llvm-svn: 118600
2010-11-09 18:43:54 +00:00
Owen Anderson
91bfeb10b5
Last try to get this reference counting right, I swear.
...
llvm-svn: 118589
2010-11-09 17:47:10 +00:00
Owen Anderson
2d335436f3
Really fix the leak in the attributes list. Thanks to Benjamin Kramer for pointing out how I was being stupid.
...
llvm-svn: 118588
2010-11-09 17:46:38 +00:00
Jim Grosbach
59002dc973
For ARM load/store instructions, encode [reg+reg] with no shifter immediate as
...
a left shift by zero.
llvm-svn: 118587
2010-11-09 17:38:15 +00:00
Jim Grosbach
9b973490c9
ARM .word data fixups don't need an adjustment.
...
llvm-svn: 118586
2010-11-09 17:36:59 +00:00
Duncan Sands
fc5ad3f0f9
Factorize code, no functionality change.
...
llvm-svn: 118516
2010-11-09 17:25:51 +00:00
Bruno Cardoso Lopes
9c5c829d9a
Fix trailing whitespace and style, no functionality change
...
llvm-svn: 118515
2010-11-09 17:25:34 +00:00
Jim Grosbach
dbfb5edbdb
Add encoder method for ARM load/store shifted register offset operands.
...
llvm-svn: 118513
2010-11-09 17:20:53 +00:00
Michael J. Spencer
d7e3b54635
System/Path/Windows: Implement GetLLVMDefaultConfigDir.
...
llvm-svn: 118507
2010-11-09 15:11:42 +00:00
Michael J. Spencer
86cdb42737
System/Path/Windows: Generalize GetUserHomeDirectory.
...
llvm-svn: 118506
2010-11-09 15:11:31 +00:00