OSDN Git Service
Arnold Schwaighofer [Fri, 12 Jun 2009 16:26:57 +0000 (16:26 +0000)]
Fix Bug 4278: X86-64 with -tailcallopt calling convention
out of sync with regular cc.
The only difference between the tail call cc and the normal
cc was that one parameter register - R9 - was reserved for
calling functions through a function pointer. After time the
tail call cc has gotten out of sync with the regular cc.
We can use R11 which is also caller saved but not used as
parameter register for potential function pointers and
remove the special tail call cc on x86-64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73233
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Fri, 12 Jun 2009 16:04:00 +0000 (16:04 +0000)]
Don't forget to match the calling convention when producing a thunk.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73231
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Fri, 12 Jun 2009 15:56:56 +0000 (15:56 +0000)]
Given two identical weak functions, produce one internal function and two weak
thunks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73230
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 12 Jun 2009 14:23:42 +0000 (14:23 +0000)]
Tweak GenLibDeps.pl so it works on solaris.
Patch by Edward O'Callaghan.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73228
91177308-0d34-0410-b5e6-
96231b3b80d8
Nicolas Geoffray [Fri, 12 Jun 2009 14:11:08 +0000 (14:11 +0000)]
After obtaining the lock, look if the function has been codegen'd by
another thread.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73227
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Fri, 12 Jun 2009 13:24:41 +0000 (13:24 +0000)]
This test is wrong. If you have two weak functions F and G you can't make
either one call the other since either one can be replaced at link time, and
they need to be independent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73225
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 12 Jun 2009 13:02:52 +0000 (13:02 +0000)]
Add clang support to the nightly test script.
Patch by Edward O'Callaghan.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73224
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 12 Jun 2009 12:52:24 +0000 (12:52 +0000)]
Credits for Edward O'Callaghan.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73223
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Fri, 12 Jun 2009 08:04:51 +0000 (08:04 +0000)]
Add an "are types equivalent" operation that ignores the types that a pointer
points to while analyzing all other fields.
Use FoldingSetNodeID to produce a good hash. This dramatically decreases run
times.
Emit thunks. This means that it can look at all functions regardless of what
the linkage is or if the address is taken, but unfortunately some small
functions can be even shorter than the thunk because our backend doesn't yet
realize it can just turn these into jumps. This means that this pass will
pessimize code on average.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73222
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Fri, 12 Jun 2009 05:39:02 +0000 (05:39 +0000)]
Fix regular expression.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73221
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Fri, 12 Jun 2009 05:20:12 +0000 (05:20 +0000)]
Don't remove aggregate-typed module level constants before encoding functions
since functions may contain aggregate constants too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73220
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Fri, 12 Jun 2009 05:18:32 +0000 (05:18 +0000)]
In an XFAIL line, treat "XFAIL: foo*bar" as a regular expression to be matched
against the target triple, instead of equivalent to "XFAIL: *".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73219
91177308-0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Fri, 12 Jun 2009 02:49:53 +0000 (02:49 +0000)]
CMake: New variable LLVM_LIBDIR_SUFFIX.
Patch by Ingmar Vanhassel!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73216
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Fri, 12 Jun 2009 02:04:47 +0000 (02:04 +0000)]
Update script to tell the user where to get the CodeSourcery crosstool, if it's
not found.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73213
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Fri, 12 Jun 2009 01:55:57 +0000 (01:55 +0000)]
Added two scripts to aid with building Linux/x86 -> Linux/ARM crosstools, using
CodeSourcery's provided GCC-based crosstools, from which we use binutils.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73212
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 11 Jun 2009 23:43:02 +0000 (23:43 +0000)]
XFAIL this on PPC Linux. This keeps showing up in the buildbot and isn't easy to fix, and I'd like it to stop masking
real failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73211
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 11 Jun 2009 23:07:04 +0000 (23:07 +0000)]
Misc x86 README updates: remove a couple of already-fixed issues,
add a few suggestions from looking at some assembly code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73210
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Thu, 11 Jun 2009 22:13:00 +0000 (22:13 +0000)]
Use forward declarations and move TargetELFWriterInfo impl to a new file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73209
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Thu, 11 Jun 2009 20:48:09 +0000 (20:48 +0000)]
Test for rev 73205 (PR 4349)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73206
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 11 Jun 2009 20:13:35 +0000 (20:13 +0000)]
Alphabetize.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73203
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 11 Jun 2009 20:10:02 +0000 (20:10 +0000)]
Remove unused parameter warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73202
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Thu, 11 Jun 2009 19:16:03 +0000 (19:16 +0000)]
Support for ELF Visibility
Emission for globals, using the correct data sections
Function alignment can be computed for each target using TargetELFWriterInfo
Some small fixes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73201
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 11 Jun 2009 17:54:56 +0000 (17:54 +0000)]
Fix 4366: store to null in non-default addr space should not be
turned into unreachable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73195
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Thu, 11 Jun 2009 16:50:48 +0000 (16:50 +0000)]
Generate libcalls for floating point arithmetic and casting operations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73194
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 11 Jun 2009 08:11:03 +0000 (08:11 +0000)]
Cosmetic changes to parameter attribute verification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73188
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 11 Jun 2009 08:09:49 +0000 (08:09 +0000)]
Avoid leaking memory in an error path. Noticed
by cppcheck.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73187
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Thu, 11 Jun 2009 06:55:48 +0000 (06:55 +0000)]
More formatting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73185
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Thu, 11 Jun 2009 06:49:55 +0000 (06:49 +0000)]
Fixed source comments. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73184
91177308-0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Thu, 11 Jun 2009 04:45:08 +0000 (04:45 +0000)]
CMake: Documented how to cross-compile with CMake.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73181
91177308-0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Thu, 11 Jun 2009 04:16:10 +0000 (04:16 +0000)]
CMake: Fixed parallel build problem related to native tblgen when
cross-compiling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73180
91177308-0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Wed, 10 Jun 2009 22:53:59 +0000 (22:53 +0000)]
CMake: Updated list of files on lib/CodeGen/CMakeLists.txt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73174
91177308-0d34-0410-b5e6-
96231b3b80d8
Jay Foad [Wed, 10 Jun 2009 08:41:11 +0000 (08:41 +0000)]
Implement and use new method Function::hasAddressTaken().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73164
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Wed, 10 Jun 2009 03:42:13 +0000 (03:42 +0000)]
Remove warnings: no newline at end of file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73156
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Tue, 9 Jun 2009 23:00:39 +0000 (23:00 +0000)]
Silence a warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73152
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Tue, 9 Jun 2009 21:48:57 +0000 (21:48 +0000)]
Reversed order of args in EXPECT_EQ() macros to be in the correct order:
EXPECT_EQ(expected, actual) . This will make error messages understandable as
it uses terms such as "expected" and "actual" based on the order of arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73150
91177308-0d34-0410-b5e6-
96231b3b80d8
Jay Foad [Tue, 9 Jun 2009 21:37:11 +0000 (21:37 +0000)]
Remove an unused function SafeToDestroyConstant(). Rename an almost
identical function ConstantIsDead() to SafeToDestroyConstant(), to
emphasise the connection with Constant::destroyConstant().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73149
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 9 Jun 2009 21:24:39 +0000 (21:24 +0000)]
Remove empty test (my DejaGNU doesn't like this)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73148
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 9 Jun 2009 21:14:25 +0000 (21:14 +0000)]
Bug fix:
string::find returns string::npos if the substring is not found.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73145
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 9 Jun 2009 20:08:51 +0000 (20:08 +0000)]
Simplified logic of this if-then statement to reduce nesting. No functionality
change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73143
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 9 Jun 2009 19:30:45 +0000 (19:30 +0000)]
Add the beginnings of an implementatation of lazy liveness analysis, based on "Fast Liveness Checking for SSA-form Programs" by Boissinot, et al.
This is still very early, hasn't been tested, and is not yet well documented. More to come soon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73141
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 9 Jun 2009 18:55:39 +0000 (18:55 +0000)]
Remove empty file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73140
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 9 Jun 2009 18:49:42 +0000 (18:49 +0000)]
I'm going to assume that this was meant to be an assignment instead of a
computation that isn't used. Please correct this if it's wrong!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73139
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Tue, 9 Jun 2009 18:31:17 +0000 (18:31 +0000)]
Revert 73074 and 73099 because Windows doesn't have POSIX
regular expressions. We will add an OpenBSD implementation
and re-apply ASAP.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73138
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 9 Jun 2009 17:18:38 +0000 (17:18 +0000)]
Use expandCodeFor instead of expand when the result will be
immediately casted. At present, this is just a minor code
simplification. In the future, the expansion code may be able
to make better choices if it knows what the desired result
type will be.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73137
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Tue, 9 Jun 2009 15:31:19 +0000 (15:31 +0000)]
PIC16 emits auto variables as globals. When optimizer removes a function entierly by estimating its side effects on globals, those globals(autos) without a function were not being printed by the Asm printer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73135
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Tue, 9 Jun 2009 00:19:10 +0000 (00:19 +0000)]
Change IndexedModeAction representation.
This changes the IndexedModeAction representation to remove the
limitation on the number of value types in MVT. This limitation
prevents us from specifying AVX types.
Prior to this change IndexedModActions was represented as follows...
uint64_t IndexedModeActions[2][ISD::LAST_INDEXED_MODE];
the first dimension was used to represent loads, then stores. This
imposed a limitation of 32 on the number of value types that could be
handled with this method. The value type was used to shift the two bits
into and out of the approprate bits in the uint64_t.
With this change the array is now represented as ...
uint8_t IndexedModeActions[MVT::LAST_VALUETYPE][2][ISD::LAST_INDEXED_MODE];
Takes more space but removes the limitation on MVT::LAST_VALUETYPE. The
first dimension is now the value_type for the reference. The second
dimension is the load [0] vs. store[1]. The third dimension represents
the various modes for load store. Accesses are now direct, no shifting
or masking.
There are other limitations that need to be removed, so that
MVT::LAST_VALUETYPE can be greater than 32. This is merely the first
step towards that goal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73104
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Mon, 8 Jun 2009 23:54:42 +0000 (23:54 +0000)]
Oops, didn't mean to commit 73102 yet. Revert it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73103
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Mon, 8 Jun 2009 23:53:19 +0000 (23:53 +0000)]
Change IndexedModeAction representation.
This changes the IndexedModeAction representation to remove the
limitation on the number of value types in MVT. This limitation
prevents us from specifying AVX types.
Prior to this change IndexedModActions was represented as follows...
uint64_t IndexedModeActions[2][ISD::LAST_INDEXED_MODE];
the first dimension was used to represent loads, then stores. This
imposed a limitation of 32 on the number of value types that could be
handled with this method. The value type was used to shift the two bits
into and out of the approprate bits in the uint64_t.
With this change the array is now represented as ...
uint8_t IndexedModeActions[MVT::LAST_VALUETYPE][2][ISD::LAST_INDEXED_MODE];
Takes more space but removes the limitation on MVT::LAST_VALUETYPE. The
first dimension is now the value_type for the reference. The second
dimension is the load [0] vs. store[1]. The third dimension represents
the various modes for load store. Accesses are now direct, no shifting
or masking.
There are other limitations that need to be removed, so that
MVT::LAST_VALUETYPE can be greater than 32. This is merely the first
step towards that goal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73102
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Mon, 8 Jun 2009 23:05:37 +0000 (23:05 +0000)]
Add a !patsubst operator. Use on string types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73099
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Mon, 8 Jun 2009 22:59:50 +0000 (22:59 +0000)]
Typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73098
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Mon, 8 Jun 2009 22:57:18 +0000 (22:57 +0000)]
Revert hunk commited by accident
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73097
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Mon, 8 Jun 2009 22:54:15 +0000 (22:54 +0000)]
Add testcase for register scanveger assertion fix in r72755
(double def due to livevars)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73096
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Mon, 8 Jun 2009 22:53:56 +0000 (22:53 +0000)]
The attached patches implement most of the ARM AAPCS-VFP hard float
ABI. The missing piece is support for putting "homogeneous aggregates"
into registers.
Patch by Sandeep Patel!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73095
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Mon, 8 Jun 2009 22:38:07 +0000 (22:38 +0000)]
Update documentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73092
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Mon, 8 Jun 2009 22:34:57 +0000 (22:34 +0000)]
Add a more robust !if test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73091
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Mon, 8 Jun 2009 22:20:58 +0000 (22:20 +0000)]
Fix DejaGNU run line to escape special characters.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73090
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 8 Jun 2009 22:17:53 +0000 (22:17 +0000)]
Document the stack alignment part of target data description.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73089
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Mon, 8 Jun 2009 21:20:36 +0000 (21:20 +0000)]
Separate V6 from V6T2 since the latter has some extra nice instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73085
91177308-0d34-0410-b5e6-
96231b3b80d8
Stefanus Du Toit [Mon, 8 Jun 2009 21:18:31 +0000 (21:18 +0000)]
Allow setting the C runtime to be used with MSVC from cmake.
Patch by Tareq Siraj.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73084
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Mon, 8 Jun 2009 20:31:02 +0000 (20:31 +0000)]
Add helper for checking of Thumb1 mode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73080
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Mon, 8 Jun 2009 20:23:18 +0000 (20:23 +0000)]
Make IntInits and ListInits typed. This helps deduce types of !if and
other operators. For the rare cases where a list type cannot be
deduced, provide a []<type> syntax, where <type> is the list element
type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73078
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Mon, 8 Jun 2009 19:16:56 +0000 (19:16 +0000)]
Make !if short-circuit when possible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73076
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 8 Jun 2009 18:18:28 +0000 (18:18 +0000)]
Revert r72898. It does not solve the problem I want it to solve.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73075
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Mon, 8 Jun 2009 17:00:34 +0000 (17:00 +0000)]
Add a !regmatch operator to do pattern matching in TableGen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73074
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Sun, 7 Jun 2009 21:49:11 +0000 (21:49 +0000)]
Delete comment and fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73040
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Sun, 7 Jun 2009 21:33:20 +0000 (21:33 +0000)]
Fix wrong elf class and byte order initializations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73039
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Sun, 7 Jun 2009 21:22:38 +0000 (21:22 +0000)]
Simple ELF32/64 binary files can now be emitted for x86 and x86_64 without
relocation sections.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73038
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sun, 7 Jun 2009 09:44:19 +0000 (09:44 +0000)]
Fix the run-line for this test to work correctly outside of x86.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73025
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sun, 7 Jun 2009 09:41:57 +0000 (09:41 +0000)]
Tweak the expansion code for BIT_CONVERT to generate better code
converting from an MMX vector to an i64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73024
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sun, 7 Jun 2009 07:28:45 +0000 (07:28 +0000)]
Get rid of some unnecessary code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73017
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 7 Jun 2009 07:26:46 +0000 (07:26 +0000)]
Create FunctionType::isValidArgumentType to go along with isValidReturnType.
Also create isValidElementType for ArrayType, PointerType, StructType and
VectorType.
Make LLParser use them. This closes up some holes like an assertion failure on:
%x = type {label}
but largely doesn't change any semantics. The only thing we accept now which
we didn't before is vectors of opaque type such as "<4 x opaque>". The opaque
can be resolved to an int or float when linking.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73016
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Sun, 7 Jun 2009 07:08:01 +0000 (07:08 +0000)]
A basic PIC16 toolchain driver.
Nice addition to the examples and also a starting point for Sanjiv to work on.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73013
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sun, 7 Jun 2009 06:52:44 +0000 (06:52 +0000)]
Slightly generalize the code that handles shuffles of consecutive loads
on x86 to handle more cases. Fix a bug in said code that would cause it
to read past the end of an object. Rewrite the code in
SelectionDAGLegalize::ExpandBUILD_VECTOR to be a bit more general.
Remove PerformBuildVectorCombine, which is no longer necessary with
these changes. In addition to simplifying the code, with this change,
we can now catch a few more cases of consecutive loads.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73012
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 7 Jun 2009 04:03:01 +0000 (04:03 +0000)]
Remove cyclic MDNode detection. Any attempt to create a cyclic MDNode will
crash LLVM first.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73011
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 7 Jun 2009 01:45:11 +0000 (01:45 +0000)]
Refuse metadata* type for function arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73010
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sun, 7 Jun 2009 01:07:55 +0000 (01:07 +0000)]
PR3628: Add patterns to match SHL/SRL/SRA to the corresponding Altivec
instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73009
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 7 Jun 2009 00:50:45 +0000 (00:50 +0000)]
Add option for specifying the path to assembler, "as". This overrides the path
to gcc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73008
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 6 Jun 2009 23:13:08 +0000 (23:13 +0000)]
Don't crash on multiple return value with no obvious inserted value.
Fixes PR4314.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73007
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 6 Jun 2009 20:08:03 +0000 (20:08 +0000)]
PR4340: Run SimplifyDemandedVectorElts on insertelement instructions;
sometimes it can find simplifications that won't be found otherwise.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73006
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 6 Jun 2009 18:14:04 +0000 (18:14 +0000)]
Move </pre> to column one to avoid an extra line of spaces in the example.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73003
91177308-0d34-0410-b5e6-
96231b3b80d8
Jay Foad [Sat, 6 Jun 2009 17:49:35 +0000 (17:49 +0000)]
Use cast<> instead of dyn_cast<> for things that are known to be
Instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73002
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 6 Jun 2009 14:37:11 +0000 (14:37 +0000)]
Rename UnknownValue to CouldNotCompute, since it holds an instance of
SCEVCouldNotCompute, and not SCEVUnknown.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72999
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 6 Jun 2009 07:08:26 +0000 (07:08 +0000)]
Fix the expansion for CONCAT_VECTORS so that it doesn't create illegal
types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72993
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 6 Jun 2009 07:04:42 +0000 (07:04 +0000)]
Factor out a couple of helpers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72992
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 6 Jun 2009 06:32:50 +0000 (06:32 +0000)]
Avoid crashing on a variable-index insertelement with element type i16.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72991
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 6 Jun 2009 06:25:09 +0000 (06:25 +0000)]
Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72990
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 6 Jun 2009 06:24:44 +0000 (06:24 +0000)]
Add a flag to permit disabling libffi.
Also, there were a bunch of flags with no text in --help because the square
brackets were in the wrong place. I've fixed those too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72989
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 6 Jun 2009 06:05:10 +0000 (06:05 +0000)]
Get rid of some bogus patterns for X86vzmovl. Don't create VZEXT_MOVL
nodes for vectors with an i16 element type. Add an optimization for
building a vector which is all zeros/undef except for the bottom
element, where the bottom element is an i8 or i16.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72988
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 6 Jun 2009 05:55:37 +0000 (05:55 +0000)]
Fix an obvious typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72987
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Sat, 6 Jun 2009 04:29:16 +0000 (04:29 +0000)]
x86_64 now uses the correct ELF e_machine type
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72986
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 6 Jun 2009 04:17:04 +0000 (04:17 +0000)]
Get rid of a bogus pattern that interferes with optimization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72985
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 6 Jun 2009 03:57:58 +0000 (03:57 +0000)]
PR2598: make sure to expand illegal forms of integer/floating-point
conversions for x86, like <2 x i32> -> <2 x float> and <4 x i16> ->
<4 x float>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72983
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Sat, 6 Jun 2009 03:56:29 +0000 (03:56 +0000)]
Remove elf specific info from ELFWriter.h to Elf.h. Code cleanup and more comments added
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72982
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 6 Jun 2009 03:27:50 +0000 (03:27 +0000)]
Make SINT_TO_FP/UINT_TO_FP vector legalization queries query on the
integer type to be consistent with normal operation legalization. No visible
change because nothing is actually using this at the moment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72980
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 5 Jun 2009 23:46:34 +0000 (23:46 +0000)]
More portability checks for CMake's config.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72975
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 5 Jun 2009 23:08:56 +0000 (23:08 +0000)]
Simplify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72970
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 5 Jun 2009 23:05:51 +0000 (23:05 +0000)]
Add explicit keywords.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72969
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 5 Jun 2009 22:39:21 +0000 (22:39 +0000)]
Simplify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72965
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 5 Jun 2009 21:57:13 +0000 (21:57 +0000)]
Add new function attribute - noimplicitfloat
Update code generator to use this attribute and remove NoImplicitFloat target option.
Update llc to set this attribute when -no-implicit-float command line option is used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72959
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Fri, 5 Jun 2009 21:37:30 +0000 (21:37 +0000)]
Adapt the x86 build_vector dagcombine to the current state of the legalizer.
build vectors with i64 elements will only appear on 32b x86 before legalize.
Since vector widening occurs during legalize, and produces i64 build_vector
elements, the dag combiner is never run on these before legalize splits them
into 32b elements.
Teach the build_vector dag combine in x86 back end to recognize consecutive
loads producing the low part of the vector.
Convert the two uses of TLI's consecutive load recognizer to pass LoadSDNodes
since that was required implicitly.
Add a testcase for the transform.
Old:
subl $28, %esp
movl 32(%esp), %eax
movl 4(%eax), %ecx
movl %ecx, 4(%esp)
movl (%eax), %eax
movl %eax, (%esp)
movaps (%esp), %xmm0
pmovzxwd %xmm0, %xmm0
movl 36(%esp), %eax
movaps %xmm0, (%eax)
addl $28, %esp
ret
New:
movl 4(%esp), %eax
pmovzxwd (%eax), %xmm0
movl 8(%esp), %eax
movaps %xmm0, (%eax)
ret
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72957
91177308-0d34-0410-b5e6-
96231b3b80d8