Commit Graph

42349 Commits

Author SHA1 Message Date
Chris Lattner 85af1ee10d 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 9d5771ea17 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 4978d35967 add new file
llvm-svn: 58955
2008-11-10 02:58:28 +00:00
Chris Lattner 6d3893359e 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 9530edd1f4 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 0d9db40994 Forgot these.
llvm-svn: 58952
2008-11-10 01:52:24 +00:00
Oscar Fuentes e9edc2cd15 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 e352ca077c 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 9f3058f3be Rename isGVNonLazyPtr to isIndirectSym to reflect how it will be used.
llvm-svn: 58949
2008-11-10 01:08:07 +00:00
Bill Wendling 4fb13c051d 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 1579287550 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 a6da027c18 CMake: Corrected detection of `nm'.
llvm-svn: 58941
2008-11-09 20:26:31 +00:00
Oscar Fuentes b45a43aec4 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 26c744492f fix validation problem.
llvm-svn: 58938
2008-11-09 17:19:14 +00:00
Duncan Sands 3b36fd87a4 XFAIL this while waiting for a fix.
llvm-svn: 58934
2008-11-09 13:07:47 +00:00
Nuno Lopes 2e42927e7c fix leakage of ValueNumbering
llvm-svn: 58933
2008-11-09 12:45:23 +00:00
Dale Johannesen aa4d82d244 Temporarily revert 58825, which breaks PPC bootstrap.
xs

llvm-svn: 58930
2008-11-09 06:48:10 +00:00
Bill Wendling 3f547be28f 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 cfb3bc4a45 Typo fix
llvm-svn: 58928
2008-11-09 02:54:13 +00:00
Scott Michel 5c0378db8e CellSPU: Update expected counts on expected patterns
llvm-svn: 58927
2008-11-09 01:03:41 +00:00
Anton Korobeynikov 9833d8c369 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 4829941a51 CMake: corrected library target name for dependency: LLVMCellSPU ->
LLVMCellSPUCodeGen.

llvm-svn: 58925
2008-11-08 21:23:15 +00:00
Oscar Fuentes 676e5194d0 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 b200b648c4 Fixed a pasto.
llvm-svn: 58923
2008-11-08 20:34:18 +00:00
Mikhail Glushenkov f5a294d08d Allow $CALL and $ENV in command names. Fixes #3025.
llvm-svn: 58922
2008-11-08 19:43:32 +00:00
Scott Michel a872e5af8a 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 0f3937115d Try to produce better code when scalarizing VSETCC.
llvm-svn: 58920
2008-11-08 18:26:48 +00:00
Anton Korobeynikov 09f51d1fd4 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 5a48f232f7 The Index field of an AttributeWithIndex is of type unsigned, not uint16_t.
llvm-svn: 58908
2008-11-08 15:36:01 +00:00
Anton Korobeynikov 09991ada2d StoreInst does not produce any result thus it's useless to create new
variable for it. This greatly reduces amount of unused variables in
llvm2cpp-generated code

llvm-svn: 58905
2008-11-08 12:58:07 +00:00
Anton Korobeynikov 9278247502 Properly escape dashes in TableGen's LLVMC2 emitter.
Patch by Patrick Walton!

llvm-svn: 58901
2008-11-08 10:16:21 +00:00
Eric Christopher 6e670388c0 Fix syntax of iterate_complex example. Noticed by Martin!
llvm-svn: 58900
2008-11-08 08:20:49 +00:00
Evan Cheng 436bdcdcca Moved InvalidateInstructionCache to ARMJITInfo::emitFunctionStub which knows size of stub.
llvm-svn: 58899
2008-11-08 08:16:49 +00:00
Evan Cheng 686a725b45 Remove a InvalidateInstructionCache call with incorrect size.
llvm-svn: 58898
2008-11-08 08:15:39 +00:00
Evan Cheng b31a717527 Rename startFunctionStub to startGVStub since it's also used for GV non-lazy ptr.
llvm-svn: 58897
2008-11-08 08:02:53 +00:00
Evan Cheng 98161f5f34 Tell ARMJITInfo if codegen relocation is PIC. It changes how function stubs are generated.
llvm-svn: 58896
2008-11-08 07:38:22 +00:00
Evan Cheng 1b889b16da Rename isString -> isExternalSymbol; getString -> getExternalSymbol since these work on externsym machine relocations.
llvm-svn: 58895
2008-11-08 07:37:34 +00:00
Evan Cheng 776f5922fb More debug output.
llvm-svn: 58894
2008-11-08 07:22:53 +00:00
Evan Cheng bb373c4637 Fix relocation for calls to external symbols.
llvm-svn: 58893
2008-11-08 07:22:33 +00:00
Scott Michel 1ccbbc3d07 CellSPU: Fix prologue/epilogue emission when function contains calls but
theframe size is 0; the prologue and epilogue should be emitted in this case.

llvm-svn: 58890
2008-11-08 05:16:20 +00:00
Daniel Dunbar 2b9dce2669 Rework r58829, allowing removal of dbg info intrinsics during alloca
promotion.
 - Eliminate uses after free and simplify tests.

Devang: Please check that this is still doing what you intended.
llvm-svn: 58887
2008-11-08 04:12:17 +00:00
Daniel Dunbar 06ad209fb1 Add LLVMC2 tool definitions for Objective-C and Objective-C++.
llvm-svn: 58885
2008-11-08 03:25:47 +00:00
Evan Cheng 077c8f8832 Skip over two-address use operands.
llvm-svn: 58883
2008-11-08 01:44:13 +00:00
Evan Cheng ffdd91e3b8 Handle ARM machine constantpool entry with non-lazy ptr.
llvm-svn: 58882
2008-11-08 01:31:27 +00:00
Evan Cheng b126422533 Indentation.
llvm-svn: 58881
2008-11-08 01:30:20 +00:00
Ted Kremenek 865da3cae0 remove unavailable clang project
llvm-svn: 58879
2008-11-08 01:02:44 +00:00
Evan Cheng 454ff53d58 Use ARMFunctionInfo to track number of constpool entries and jumptables.
llvm-svn: 58877
2008-11-08 00:51:41 +00:00
Dale Johannesen d70bd61758 Generated code for generic expansion of SETUGT etc.
is noticeably worse than previous PPC-specific code.
Since the latter was also wrong in some cases and
correctness is more important than efficiency, I'm
disabling this test temporarily while I fix it.

llvm-svn: 58876
2008-11-08 00:49:19 +00:00
Dale Johannesen ee04c24bd5 Xfail an incorrect test.
llvm-svn: 58875
2008-11-08 00:40:24 +00:00
Dale Johannesen bb5c9b4b68 Make testb optimization work on big-endian targets.
llvm-svn: 58874
2008-11-08 00:01:16 +00:00