1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-27 22:12:47 +01:00
Commit Graph

42570 Commits

Author SHA1 Message Date
Bill Wendling
891f177dd0 Temporarily revert r58979 and related patch. It's causing a failure in X86 bootstrap:
Comparing stages 2 and 3
warning: ./cc1-checksum.o differs
warning: ./cc1obj-checksum.o differs
warning: ./cc1objplus-checksum.o differs
warning: ./cc1plus-checksum.o differs
Bootstrap comparison failure!
./alias.o differs
./alloc-pool.o differs
./attribs.o differs
./bb-reorder.o differs
./bitmap.o differs
./build/errors.o differs
./build/genattrtab.o differs
./build/genautomata.o differs
./build/genemit.o differs
./build/genextract.o differs
...

-bw

llvm-svn: 59003
2008-11-10 21:22:06 +00:00
Bill Wendling
0421da9e9e - Make sure that we don't over-increment the iterator when going through the
basic blocks.
- Minor code clean-up.

llvm-svn: 59002
2008-11-10 21:13:10 +00:00
Mon P Wang
6792115592 Added CONVERT_RNDSAT (conversion with rounding and saturation) SDNode to
support targets that support these conversions. Users should avoid using
this node as the current targets don't generating code for it.

llvm-svn: 59001
2008-11-10 20:54:11 +00:00
Steve Naroff
db3a831e70 Update VC++ project file.
llvm-svn: 58997
2008-11-10 20:03:21 +00:00
Devang Patel
f0d6bd18d5 If the sign of exit condition and split condition does not match
then do not split loop index.

llvm-svn: 58995
2008-11-10 19:48:34 +00:00
Duncan Sands
22e8a45a01 Fix PR2667: add soft float support for sint_to_fp/uint_to_fp
where the argument is an apint, or smaller than the minimum
size for which there is a libcall (i32). 

llvm-svn: 58994
2008-11-10 17:36:26 +00:00
Duncan Sands
eca6e696ca Tweak some comments.
llvm-svn: 58993
2008-11-10 17:31:56 +00:00
Duncan Sands
b6c3634c90 Small cleanups. No functionality change intended!
llvm-svn: 58992
2008-11-10 17:29:56 +00:00
Duncan Sands
1d0b7dccf7 When promoting the result of fp_to_uint/fp_to_sint,
inform the optimizers that the result must be zero/
sign extended from the smaller type.  For example,
if a fp to unsigned i16 is promoted to fp to i32,
then we are allowed to assume that the extra 16 bits
are zero (because the result of fp to i16 is undefined
if the result does not fit in an i16).  This is
quite aggressive, but should help the optimizers
produce better code.  This requires correcting a
test which thought that fp_to_uint is some kind
of truncation, which it is not: in the testcase
(which does fp to i1), either the fp value converts
to 0 or 1 or the result is undefined, which is
quite different to truncation.

llvm-svn: 58991
2008-11-10 17:28:30 +00:00
Duncan Sands
dda3cac043 Work around PR1000.
llvm-svn: 58984
2008-11-10 10:05:09 +00:00
Anton Korobeynikov
beab79d46c Proper way of doing llvm canadian-cross compilation.
Patch by Jim Grosbach!

llvm-svn: 58981
2008-11-10 07:33:13 +00:00
Dale Johannesen
28c0044273 Reenable test.
llvm-svn: 58980
2008-11-10 07:30:32 +00:00
Dale Johannesen
8a43172ff1 Really fix testb optimization on big-endian.
Fixes ppc32 bootstrap.

llvm-svn: 58979
2008-11-10 07:16:42 +00:00
Bill Wendling
b7d5ca543e Third time's a charm.
The previous patches didn't match correctly. Also, we need to make sure that
the conditional is the same before doing the transformation.

llvm-svn: 58978
2008-11-10 06:59:06 +00:00
Chris Lattner
73381d71dd final edits
llvm-svn: 58966
2008-11-10 05:40:34 +00:00
Mon P Wang
911ee5bf8b Added support for the following definition of shufflevector
<result> = shufflevector <n x <ty>> <v1>, <n x <ty>> <v2>, <m x i32> <mask> 

llvm-svn: 58964
2008-11-10 04:46:22 +00:00
Chris Lattner
ed6022f676 eliminate a couple more uses of utohexstr.
llvm-svn: 58963
2008-11-10 04:35:24 +00:00
Chris Lattner
1185c9a72c Use utohex_buffer instead of utohexstr to avoid creating a temporary
string in the .ll and .s printers.

llvm-svn: 58962
2008-11-10 04:30:26 +00:00
Chris Lattner
46166d50a8 split out the functionality of utohexstr into a new utohex_buffer
helper.  This allows us to convert numbers to hex without necessarily
needing to make a std::string to hold the result.

llvm-svn: 58961
2008-11-10 04:22:46 +00:00
Chris Lattner
694acd0d73 Move getCastToEmpty out of DIDescriptor into DIFactory. It is an
implementation detail of DIFactory anyway, and this allows it to avoid
recomputing the same type over and over.

llvm-svn: 58960
2008-11-10 04:10:34 +00:00
Chris Lattner
2fefd3dd69 Fix an over aggressive assumption that struct decls will have a pointer to
an array that is empty.  Instead of requiring this array, allow a null pointer.
This shrinks all forward references of structs.

llvm-svn: 58959
2008-11-10 03:48:55 +00:00
Chris Lattner
ef29c60566 Fix a bug with default arguments that apple gcc doesn't notice that llvmbb does.
llvm-svn: 58958
2008-11-10 03:11:39 +00:00
Chris Lattner
46c28be6ae move some cases around to silence these sorts of warnings in
release-asserts build:

llvm/CodeGen/SelectionDAGNodes.h:1298: warning: control may reach end of non-void function 'unsigned int llvm::MVT::getSizeInBits() const' being inlined

what an unhelpful warning.

llvm-svn: 58957
2008-11-10 03:05:41 +00:00
Chris Lattner
0d1da3eeaa add new file
llvm-svn: 58955
2008-11-10 02:58:28 +00:00
Chris Lattner
83d19fba9b Add a new set of helper classes for creating and reading debug
information.  This logically replaces the "Desc" classes in
MachineModuleInfo.  Nice features of these classes are that they:

1. Are much more efficient than MMI because they don't create a 
   temporary parallel data structure for debug info that has to be
   'serialized' and 'deserialized' into/out of the module.
2. These provide a much cleaner abstraction for debug info than 
   MMI, which will make it easier to change the implementation in 
   the future (to be MDNode-based).
3. These are much easier to use than the MMI interfaces, requiring
   a lot less code in the front-ends.
4. These can be used to both create (for frontends) and read (for
   codegen) debug information.  DebugInfoBuilder can only be used
   to create the nodes.

So far, this is implemented just enough to support the debug info
generation needs of clang.  This can and should be extended to 
support the full set of debug info constructs, and we should switch
llvm-gcc and llc over to using this in the near future.

This code also has a ton of FIXMEs in it, because the way we 
currently represent debug info in LLVM IR is basically insane in a
variety of details.  This sort of issue should be fixed when we
eventually reimplement debug info on top of MDNodes.

llvm-svn: 58954
2008-11-10 02:56:27 +00:00
Oscar Fuentes
dcc0b8b548 CMake: Builds a native tblgen when cross-compiling and the user didn't
set LLVM_TABLEGEN.

llvm-svn: 58953
2008-11-10 02:35:55 +00:00
Evan Cheng
e2bed5dc3b Forgot these.
llvm-svn: 58952
2008-11-10 01:52:24 +00:00
Oscar Fuentes
45f4e26142 CMake: Implement magic word `all' for selecting all targets. Check
that specified targets are known.

llvm-svn: 58951
2008-11-10 01:47:07 +00:00
Oscar Fuentes
4067286e8d CMake: Non-working code for auto-building the native tblgen util when
cross-compiling.

llvm-svn: 58950
2008-11-10 01:32:14 +00:00
Evan Cheng
080c1a9fac Rename isGVNonLazyPtr to isIndirectSym to reflect how it will be used.
llvm-svn: 58949
2008-11-10 01:08:07 +00:00
Bill Wendling
137550d34d Correction for the last patch. Should match the conditional in the first part
of the select match, not the select instruction itself.

llvm-svn: 58947
2008-11-09 23:37:53 +00:00
Bill Wendling
3b91357ef0 The method of doing the matching with a 'select' instruction was wrong. The
original code was matching like this:

	if (match(A, m_Not(m_Value(B))))

B was already matched as a 'select' instruction. However, this isn't matching
what we think it's matching. It would match B as a 'Value', so basically
anything would match to it. In this case, a Constant matched. B was replaced
with a constant representation. And then the wrong value would be used in the
SelectInst::Create statement, causing a crash.

After thinking on this for a moment, and after Nick L. told me how the pattern
matching stuff was supposed to work, the solution was to match NOT an m_Value,
but an m_Select.

llvm-svn: 58946
2008-11-09 23:17:42 +00:00
Oscar Fuentes
7f47a65445 CMake: Corrected detection of `nm'.
llvm-svn: 58941
2008-11-09 20:26:31 +00:00
Oscar Fuentes
bb9c221f2a CMake: Support for cross-compiling. For now, requires a previously
built native tblgen which is passed to cmake in the variable
LLVM_TABLEGEN.

See

http://www.cmake.org/Wiki/CmakeMingw

for a quick example on how to cross-compile with CMake.

llvm-svn: 58939
2008-11-09 18:53:19 +00:00
Chris Lattner
4b49b69b81 fix validation problem.
llvm-svn: 58938
2008-11-09 17:19:14 +00:00
Duncan Sands
3bc55fc46f XFAIL this while waiting for a fix.
llvm-svn: 58934
2008-11-09 13:07:47 +00:00
Nuno Lopes
6dfcc8cf45 fix leakage of ValueNumbering
llvm-svn: 58933
2008-11-09 12:45:23 +00:00
Dale Johannesen
27c03be35e Temporarily revert 58825, which breaks PPC bootstrap.
xs

llvm-svn: 58930
2008-11-09 06:48:10 +00:00
Bill Wendling
436d4cce83 If the LHS of the FCMP is coming from a UIToFP instruction, then we don't want
to generate signed ICMP instructions to replace the FCMP. This would violate
the following:

define i1 @test1(i32 %val) {
  %1 = uitofp i32 %val to double
  %2 = fcmp ole double %1, 0.000000e+00
  ret i1 %2
}

would be transformed into:

define i1 @test1(i32 %val) {
  %1 = icmp slt i33 %val, 1
  ret i1 %1
}

which is obviously wrong. This patch modifes InstCombiner::FoldFCmp_IntToFP_Cst
to handle when the LHS comes from UIToFP.

llvm-svn: 58929
2008-11-09 04:26:50 +00:00
Anton Korobeynikov
cc2b340d11 Typo fix
llvm-svn: 58928
2008-11-09 02:54:13 +00:00
Scott Michel
d168ef3d26 CellSPU: Update expected counts on expected patterns
llvm-svn: 58927
2008-11-09 01:03:41 +00:00
Anton Korobeynikov
a4933e408d Temporary revert my last commit: it seems it's triggering some subtle bug in backend
and breaks llvm-gcc

llvm-svn: 58926
2008-11-08 23:05:05 +00:00
Oscar Fuentes
4d83014ea6 CMake: corrected library target name for dependency: LLVMCellSPU ->
LLVMCellSPUCodeGen.

llvm-svn: 58925
2008-11-08 21:23:15 +00:00
Oscar Fuentes
a2b285ef48 CMake: Reflected changes on the CellSPU target build. May require a
clean start.

llvm-svn: 58924
2008-11-08 20:37:19 +00:00
Oscar Fuentes
486fd29325 Fixed a pasto.
llvm-svn: 58923
2008-11-08 20:34:18 +00:00
Mikhail Glushenkov
3e7723bbac Allow $CALL and $ENV in command names. Fixes #3025.
llvm-svn: 58922
2008-11-08 19:43:32 +00:00
Scott Michel
4a683f438d CellSPU: Bring SPU's assembly printer more in-line with current LLVM code
structure. Assembly printer now outputs the correct section for strings.

llvm-svn: 58921
2008-11-08 18:59:02 +00:00
Duncan Sands
da4e03de04 Try to produce better code when scalarizing VSETCC.
llvm-svn: 58920
2008-11-08 18:26:48 +00:00
Anton Korobeynikov
e3b9284fa8 Factor out offset printing code into generic AsmPrinter.
FIXME: it seems, that most of targets don't support
offsets wrt CPI/GlobalAddress', was it intentional?

llvm-svn: 58917
2008-11-08 17:21:38 +00:00
Nicolas Geoffray
76100fd4de The Index field of an AttributeWithIndex is of type unsigned, not uint16_t.
llvm-svn: 58908
2008-11-08 15:36:01 +00:00