1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
Commit Graph

29590 Commits

Author SHA1 Message Date
Nick Lewycky
dc5ef94320 Implement udiv for ConstantRanges.
llvm-svn: 75413
2009-07-12 05:18:18 +00:00
Bill Wendling
dcf4c8e237 Temporarily revert r75408. It appears to break the Apple-style builds:
x86_64-apple-darwin10-gcc -c   -g -O2  -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute   -mdynamic-no-pic -DHAVE_CONFIG_H -I. -I. -I/Volumes/Sandbox/Buildbot/llvm/build.llvm-gcc-x86_64-darwin10-selfhost/build/llvmgcc42.roots/llvmgcc42~obj/src/gcc -I/Volumes/Sandbox/Buildbot/llvm/build.llvm-gcc-x86_64-darwin10-selfhost/build/llvmgcc42.roots/llvmgcc42~obj/src/gcc/. -I/Volumes/Sandbox/Buildbot/llvm/build.llvm-gcc-x86_64-darwin10-selfhost/build/llvmgcc42.roots/llvmgcc42~obj/src/gcc/../include -I./../intl -I/Volumes/Sandbox/Buildbot/llvm/build.llvm-gcc-x86_64-darwin10-selfhost/build/llvmgcc42.roots/llvmgcc42~obj/src/gcc/../libcpp/include  -I/Volumes/Sandbox/Buildbot/llvm/build.llvm-gcc-x86_64-darwin10-selfhost/build/llvmgcc42.roots/llvmgcc42~obj/src/gcc/../libdecnumber -I../libdecnumber -I/Volumes/Sandbox/Buildbot/llvm/build.llvm-gcc-x86_64-darwin10-selfhost/build/llvmCore.roots/llvmCore~dst/Developer/usr/local/include -I/Volumes/Sandbox/Buildbot/llvm/build.llvm-gcc-x86_64-darwin10-selfhost/build/llvmCore.roots/llvmCore~obj/src/include -DENABLE_LLVM -I/Volumes/Sandbox/Buildbot/llvm/build.llvm-gcc-x86_64-darwin10-selfhost/build/llvmCore.roots/llvmCore~dst/Developer/usr/local/include  -D_DEBUG  -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DLLVM_VERSION_INFO='"9999"' -DBUILD_LLVM_APPLE_STYLE   /Volumes/Sandbox/Buildbot/llvm/build.llvm-gcc-x86_64-darwin10-selfhost/build/llvmgcc42.roots/llvmgcc42~obj/src/gcc/tree-ssa-alias.c -o tree-ssa-alias.o
/var/tmp//ccJQ2JBT.s:4134:Incorrect register `%rcx' used with `l' suffix
make[2]: *** [tree-ssa-live.o] Error 1
make[2]: *** Waiting for unfinished jobs....

llvm-svn: 75412
2009-07-12 02:49:22 +00:00
Nick Lewycky
6663d6ad6f Implement ConstantRange::multiply based on the code in LoopVR.
llvm-svn: 75410
2009-07-12 02:19:05 +00:00
Eli Friedman
8c0118042a Remove check which is duplicated in
InstCombiner::visitSelectInstWithICmp.

llvm-svn: 75409
2009-07-12 02:00:05 +00:00
Chris Lattner
83effafb6b eliminate MOV64r0 in favor of a Pat<> pattern. This is only nontrivial because
the div lowering code explicitly references it.

llvm-svn: 75408
2009-07-12 00:47:55 +00:00
Chris Lattner
a54c70286c fix x86-64 static codegen to materialize the address of a global with movl instead
of lea.  It is better for code size (and presumably efficiency) to use:

  movl $foo, %eax

rather than:

  leal foo, eax

Both give a nice zero extending "move immediate" instruction, the former is just
smaller.  Note that global addresses should be handled different by the x86
backend, but I chose to follow the style already in place and add more fixme's.

llvm-svn: 75403
2009-07-11 23:17:29 +00:00
Chris Lattner
3ab73a2545 fix a bug in my cleanup patch
llvm-svn: 75402
2009-07-11 23:07:30 +00:00
Chris Lattner
4902f811b6 comment cleanup, reduce nesting.
llvm-svn: 75398
2009-07-11 22:50:33 +00:00
Chris Lattner
2af5f2aeca remove some dead patterns, WrapperRIP doesn't exist in -static mode
anymore, so these aren't needed.

llvm-svn: 75397
2009-07-11 22:47:21 +00:00
Chris Lattner
edf6f031d8 silence a vc++ warning.
llvm-svn: 75393
2009-07-11 22:31:59 +00:00
Nick Lewycky
d3d5cfa475 Revert r75252 which was causing some crashes at compile time.
llvm-svn: 75384
2009-07-11 20:38:25 +00:00
Chris Lattner
496f872969 Fix PR4533, which is about buggy codegen in x86-64 -static mode.
Basically, using:
  lea symbol(%rip), %rax

is not valid in -static mode, because the current RIP may not be
within 32-bits of "symbol" when an app is built partially pic and
partially static.  The fix for this is to compile it to:

  lea symbol, %rax

It would be better to codegen this as:

  movq $symbol, %rax

but that will come next.


The hard part of fixing this bug was fixing abi-isel, which was actively
testing for the wrong behavior.  Also, the RUN lines are completely impossible
to understand what they are testing.  To help with this, convert the -static 
x86-64 codegen tests to use filecheck.  This is much more stable and makes it
more clear what the codegen is expected to be.

llvm-svn: 75382
2009-07-11 20:29:19 +00:00
Torok Edwin
ae8a3ff177 assert(0) -> LLVM_UNREACHABLE.
Make llvm_unreachable take an optional string, thus moving the cerr<< out of
line.
LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for
NDEBUG builds.

llvm-svn: 75379
2009-07-11 20:10:48 +00:00
Mikhail Glushenkov
8ce78c596d Delete the temp dir even when '--temp-dir' is specified.
llvm-svn: 75374
2009-07-11 19:27:07 +00:00
Nick Lewycky
3e43cd4105 Fix handling of max and full set.
A full set is a constant range that represents any number. If you take the
umax of that and [5, 10) you end up with [5, INT_MAX] because the values less
than 5 would be umax's against a value which is at least 5.

llvm-svn: 75372
2009-07-11 19:22:21 +00:00
Nick Lewycky
58a6fd9824 Clarify and simplify.
llvm-svn: 75366
2009-07-11 17:04:01 +00:00
Torok Edwin
9b41a5faf2 Convert more assert(0)+abort() -> LLVM_UNREACHABLE,
and abort()/exit() -> llvm_report_error().

llvm-svn: 75363
2009-07-11 13:10:19 +00:00
Evan Cheng
20086680b0 Don't put IT instruction before conditional branches.
llvm-svn: 75361
2009-07-11 07:26:20 +00:00
Evan Cheng
03d981d91b Smarter isel of ldrsb / ldrsh. Only make use of these when [r,r] address is feasible.
llvm-svn: 75360
2009-07-11 07:08:13 +00:00
Evan Cheng
268b47b1fb Major changes to Thumb (not Thumb2). Many 16-bit instructions either modifies CPSR when they are outside the IT blocks, or they can predicated when in Thumb2. Move the implicit def of CPSR to an optional def which defaults CPSR. This allows the 's' bit to be toggled dynamically.
A side-effect of this change is asm printer is now using unified assembly. There are some minor clean ups and fixes as well.

llvm-svn: 75359
2009-07-11 06:43:01 +00:00
Evan Cheng
e83b947a2c 80 col violation.
llvm-svn: 75358
2009-07-11 06:37:27 +00:00
Nick Lewycky
fee40fdcd9 Move a method that creates constant ranges relative to another constant range
per icmp predicate out of predsimplify and into ConstantRange.

Add another utility method that determines whether one range is a subset of
another. Combine with the former to determine whether icmp pred range, range
is known to be true or not.

llvm-svn: 75357
2009-07-11 06:15:39 +00:00
Evan Cheng
9d134d08dc Fix up support for OptionalDefOperand when it defaults to an actual register def. I need this to get ready for major Thumb1 surgery.
llvm-svn: 75328
2009-07-11 01:06:50 +00:00
Eli Friedman
2d27c23fb6 Use CreateStackStoreLoad helper in more places.
llvm-svn: 75320
2009-07-11 00:11:07 +00:00
Evan Cheng
8a86ec9857 Two-address pass should use findCommutedOpIndices to determine what registers are commuted.
llvm-svn: 75317
2009-07-11 00:04:23 +00:00
Evan Cheng
84a8e5aadc Use findCommutedOpIndices to find the operands to commute.
llvm-svn: 75312
2009-07-10 23:26:12 +00:00
Bob Wilson
88593195a0 Add superclasses of ARM Neon quad registers. The Q2PR class contains pairs of
quad registers and the Q4PR class holds sets of 4 quad registers.

llvm-svn: 75309
2009-07-10 23:09:06 +00:00
Bob Wilson
48729a2025 Add new vector types for 192-bit, 348-bit and 512-bit sizes.
These are needed to represent ARM Neon struct datatypes containing 2, 3 or 4
separate vectors.

llvm-svn: 75308
2009-07-10 23:05:09 +00:00
Chris Lattner
a403645785 remove the "debug" modifier, it is only used by one instruction which can
never be generated.

llvm-svn: 75305
2009-07-10 22:34:11 +00:00
Chris Lattner
84bf9fed2b add support for .zerofill, patch by Kevin Enderby!
llvm-svn: 75301
2009-07-10 22:20:30 +00:00
Jeffrey Yasskin
0f896380f6 Oops. s/#if defined(USE_OPROFILE)/#if USE_OPROFILE/. We #define
USE_OPROFILE to 0 on some paths through configure, which does the
wrong thing with #if defined().

llvm-svn: 75300
2009-07-10 22:13:21 +00:00
Chris Lattner
70881971d2 make pcrel and non-pcrel global printing more similar.
llvm-svn: 75298
2009-07-10 21:57:21 +00:00
Evan Cheng
94967abfe3 Undo my brain cramp.
llvm-svn: 75290
2009-07-10 21:31:42 +00:00
David Greene
a60479705b Make changes suggested by Chris and eliminate newly-added raw_ostream
hooks as they're no longer needed.

The major change with this patch is to make formatted_raw_ostream usable
by any client of raw_ostream.

llvm-svn: 75283
2009-07-10 21:14:44 +00:00
Jeffrey Yasskin
4f8961d587 Add a --with-oprofile flag to configure, which uses OProfile's agent
library to tell it the addresses of JITted functions.  For a
particular program, this changes the opreport -l output from:

samples %    image name        symbol name
48182  98.9729 anon (tgid:19412 range:0x7f12ccaab000-0x7f12cdaab000) anon (tgid:19412 range:0x7f12ccaab000-0x7f12cdaab000)
11     0.0226  libstdc++.so.6.0.9    /usr/lib/libstdc++.so.6.0.9

to:

samples %    image name        symbol name
24565  60.7308 19814.jo        fib_left
15365  37.9861 19814.jo        fib_right
22     0.0544  ld-2.7.so       do_lookup_x

llvm-svn: 75279
2009-07-10 21:08:20 +00:00
Chris Lattner
1781e322d7 code model is never set to default.
llvm-svn: 75278
2009-07-10 21:03:06 +00:00
Chris Lattner
4b7ff8e0c0 fix indentation
llvm-svn: 75277
2009-07-10 21:01:59 +00:00
Chris Lattner
478fc8442b remove the now-dead TM argument to these methods.
llvm-svn: 75276
2009-07-10 21:00:45 +00:00
Chris Lattner
9c13214ee8 make PIC vs DynamicNoPIC be explicit in PICStyles.
llvm-svn: 75275
2009-07-10 20:58:47 +00:00
Chris Lattner
933108f921 some minor simplifications.
llvm-svn: 75274
2009-07-10 20:53:38 +00:00
Chris Lattner
9deef50410 add a couple of predicates to test for "stub style pic in PIC mode" and "stub style pic in dynamic-no-pic" mode.
llvm-svn: 75273
2009-07-10 20:47:30 +00:00
Dan Gohman
5749595b5b Remove ScalarEvolution::hasSCEV, which isn't being used, and which
breaks encapsulation. Also remove a dead prototype for setSCEV.

llvm-svn: 75272
2009-07-10 20:25:29 +00:00
Duncan Sands
f32be25f82 Avoid compiler warnings when assertions are turned off.
llvm-svn: 75269
2009-07-10 20:10:14 +00:00
Duncan Sands
fff8443450 Avoid compiler warnings if assertions turned off.
llvm-svn: 75267
2009-07-10 20:07:07 +00:00
Evan Cheng
7f57128609 CMOVxx doesn't swap operands which it's commuted.
llvm-svn: 75266
2009-07-10 19:26:57 +00:00
Evan Cheng
52ce32d097 Remove TargetInstrInfo::CommuteChangesDestination and added findCommutedOpIndices which returns the operand indices which are swapped (when applicable). This allows for some code clean up and future enhancements.
llvm-svn: 75264
2009-07-10 19:15:51 +00:00
David Greene
c6a6fb7906 Eliminate an unnecessary include.
llvm-svn: 75256
2009-07-10 17:55:38 +00:00
Owen Anderson
7076f1ffb7 Push LLVMContext through the PatternMatch API.
llvm-svn: 75255
2009-07-10 17:35:01 +00:00
David Goodwin
1a6f4f6f8d Predicate VFP instructions on HasVFP2 instead of IsARM. This allows VFP instructions with thumb-2.
llvm-svn: 75254
2009-07-10 17:03:29 +00:00
Dan Gohman
404a92e330 Generalize ScalarEvolution's cast-folding code to support more kinds
of loops. Add several new functions to for working with ScalarEvolution's
add-hoc value-range analysis functionality.

llvm-svn: 75252
2009-07-10 16:42:52 +00:00