Commit Graph

95572 Commits

Author SHA1 Message Date
Chris Lattner c5afd12557 even more simplifications. ARM MCInstLowering is now just
a single function instead of a class.  It doesn't need the
complexity that X86 does.

llvm-svn: 119070
2010-11-14 20:58:38 +00:00
Chris Lattner 7c4dfc28ce hopefully unbreak the cmake build, patch by frits van bommel.
llvm-svn: 119069
2010-11-14 20:51:15 +00:00
Chris Lattner 18442f5543 more shrinkification
llvm-svn: 119068
2010-11-14 20:41:53 +00:00
Chris Lattner 3040e8c69b more simplifications.
llvm-svn: 119067
2010-11-14 20:40:08 +00:00
Chris Lattner b28e691657 simplify and tidy up
llvm-svn: 119066
2010-11-14 20:31:06 +00:00
Chris Lattner 0dcd800b22 implement basic support for memory operands and crbit operands,
this fixes 3 more ppc tests.

llvm-svn: 119065
2010-11-14 20:22:56 +00:00
Oscar Fuentes 4d39cc4a62 CMakeLists.txt: removed mismatched endif predicate.
llvm-svn: 119064
2010-11-14 20:15:05 +00:00
Chris Lattner 9488143769 implement several trivial operand printers, reducing
failures in CodeGen/PowerPC from 120 -> 117

llvm-svn: 119063
2010-11-14 20:11:21 +00:00
Chris Lattner 7a5c57ecf4 Implement support for printing register and immediate operands,
add support for darwin vs aix syntax.  We now can print instructions
like this:

	add r3, r3, r4
	blr 

and (in aix mode):
	add 3, 3, 4
	blr 

llvm-svn: 119062
2010-11-14 20:02:39 +00:00
Chris Lattner 686a095d89 stub out PPCMCInstLowering, add a new option that uses it and the new
instprinter when -enable-ppc-inst-printer is passed to llc.

llvm-svn: 119061
2010-11-14 19:53:02 +00:00
Rafael Espindola b05ef7377a Fix the type of a symbol created with .comm and no corresponding .type.
llvm-svn: 119060
2010-11-14 19:40:55 +00:00
Chris Lattner a76eab433a stub out a powerpc MCInstPrinter implementation.
llvm-svn: 119059
2010-11-14 19:40:38 +00:00
Chris Lattner a4113464f3 hopefully fix cmake as well.
llvm-svn: 119058
2010-11-14 19:12:57 +00:00
Chris Lattner 287766075f fix the autoconf script to detect "has asmprinter"ness of a target by
looking for lib/Target/*AsmPrinter.cpp.  Fix llvm-config to handle targets
that don't have an explicit AsmPrinter library.

llvm-svn: 119057
2010-11-14 19:10:47 +00:00
Chris Lattner 66031ed839 move all the target's asmprinters into the main target. The piece
that should be split out is the InstPrinter (if a target is mc'ized).
This change makes all the targets be consistent.

llvm-svn: 119056
2010-11-14 18:43:56 +00:00
Duncan Sands b99f39b9f6 If dom tree information is available, make it possible to pass
it to get better phi node simplification.

llvm-svn: 119055
2010-11-14 18:36:10 +00:00
Chris Lattner 56477d1690 move PPCAsmPrinter into the main PPC library, like ARM and X86.
llvm-svn: 119054
2010-11-14 18:33:33 +00:00
Chris Lattner dab307c6f4 fix cmake
llvm-svn: 119053
2010-11-14 18:27:11 +00:00
Chris Lattner 7b783e7cb2 no alpha jit support.
llvm-svn: 119052
2010-11-14 18:25:50 +00:00
Chris Lattner 9007c368c6 remove JIT support from the Alpha backend. The JIT will be moving to MC,
and the Alpha backend isn't MCized yet.  Approved by Andrew.

llvm-svn: 119051
2010-11-14 18:24:41 +00:00
Dale Johannesen 2cd8b08207 Segregate tests by target.
llvm-svn: 119050
2010-11-14 18:14:32 +00:00
Chris Lattner 57479f5ce9 random acts of tidiness.
llvm-svn: 119049
2010-11-14 18:09:50 +00:00
Ted Kremenek 0526f52a49 Revert r119045. It was failing on Windows.
llvm-svn: 119048
2010-11-14 17:53:34 +00:00
Ted Kremenek ca817a3c0c "Fix" some unintentional fallout from converting
the Stmt* visitation in CursorVisitor to be
data-recursive.

Since AnnotationTokensWorker explicitly calls
CursorVisitor::VisitChildren(), it essentially
transforms the data-recursive algorithm in
CursorVisitor back into a non-data recursive one.
This is particularly bad because the data-recursive
algorithm uses more stack space per stack frame,
which can cause us to blow the stack in some cases.

"Fix" this by making the stack that AnnotationTokensWorker
runs in really huge.  The real fix is to modify
AnnotationTokensWorker not to do the explicit
recursive call.

llvm-svn: 119047
2010-11-14 17:47:35 +00:00
Ted Kremenek 96b329c428 Clean up initialization of LangOptions object by splitting part of it into a parent class
'LangOptionsBase' that default initializes all flags to 0.  Now the ctor of LangOptions
only initializes the flags that might be non-zero (significantly simplifying things).

This also appeases Valgrind on Mac OS X, which no longer reports that one of the flags
may be uninitialized.

llvm-svn: 119045
2010-11-14 17:04:23 +00:00
Zhongxing Xu fee455fcf5 Revert r118991.
Elidable CXXConstructExpr should inhibit calling destructor for temporary 
that is copied, not the one created. This is because eliding copy constructor 
means that the object that was to be copied will be constructed directly in 
memory the copy would be constructed in.

llvm-svn: 119044
2010-11-14 15:23:50 +00:00
Duncan Sands 4581ddc123 Teach InstructionSimplify about phi nodes. I chose to have it simply
offload the work to hasConstantValue rather than do something more
complicated (such handling mutually recursive phis) because (1) it is
not clear it is worth it; and (2) if it is worth it, maybe such logic
would be better placed in hasConstantValue.  Adjust some GVN tests
which are now cleaned up much further (eg: all phi nodes are removed).

llvm-svn: 119043
2010-11-14 13:30:18 +00:00
Duncan Sands 1d27f01210 Boost the power of phi node constant folding slightly: if all
operands are the phi node itself or undef, then return undef.
This logic already existed at a higher level so in practice it
shouldn't make the slightest difference.  Note that this code
could be replaced by a call to PN->hasConstantValue().  However
since we bail out the moment we see a non-constant operand, it
is more efficient to have a specialized version of that logic.

llvm-svn: 119041
2010-11-14 12:53:18 +00:00
NAKAMURA Takumi dddfdc81ef unittests/CMakeLists.txt: Add missing VMCore/ValueMapTest.cpp to VMCoreTests.
llvm-svn: 119040
2010-11-14 12:37:51 +00:00
Duncan Sands 7e800d6f9c Strip trailing whitespace.
llvm-svn: 119038
2010-11-14 11:23:23 +00:00
John McCall 83fe49d1e1 Always emit full loads from volatile complex l-values.
Return the result of a complex assignment with the original values,
not by performing a load from the l-value;  this is the correct
semantics in C, although not in C++.

llvm-svn: 119037
2010-11-14 09:40:28 +00:00
John McCall d764625448 Add a few more complex-related cast kinds that arise due to arbitrary
implicit conversions;  the last batch was specific to promotions.
I think this is the full set we need.  I do think dividing the cast
kinds into floating and integral is probably a good idea.

Annotate a *lot* more C casts with useful cast kinds.

llvm-svn: 119036
2010-11-14 08:17:51 +00:00
Chris Lattner 2536851543 typo2
llvm-svn: 119035
2010-11-14 07:30:46 +00:00
Chris Lattner 11a8d05bea fix typo
llvm-svn: 119034
2010-11-14 07:09:32 +00:00
Chris Lattner 8d22ff90a3 rename test.
llvm-svn: 119033
2010-11-14 07:03:49 +00:00
Chris Lattner befbf975e8 filecheckize, remove an old and useless test
llvm-svn: 119032
2010-11-14 07:03:38 +00:00
Chris Lattner 4e44cb8bcb this test is pretty pointless and "propogation" isn't a word (or so Misha claims).
llvm-svn: 119031
2010-11-14 07:02:03 +00:00
Ted Kremenek d57f43eb3a CursorVisitor: make data-recursion algorithm the default except for the few remaining Exprs still
covered by the normal recursive visitation.

llvm-svn: 119030
2010-11-14 05:45:47 +00:00
Owen Anderson e0f6b41618 Second attempt at providing correct encodings for Thumb2 binary operators.
llvm-svn: 119029
2010-11-14 05:37:38 +00:00
Ted Kremenek d34c65d8a2 Remove stale #include.
llvm-svn: 119028
2010-11-14 05:28:43 +00:00
Fariborz Jahanian 574940e16f Removed unnecessary initialization of a flag which
somehow got several block tests fail with a linux built
compiler.

llvm-svn: 119027
2010-11-14 05:25:15 +00:00
Rafael Espindola 7d0ba3464e Handle a peculiar comdat case: Creating a section with an undefined
signature symbol causes a local symbol to be created unless there is
some other use of the symbol.

llvm-svn: 119026
2010-11-14 04:17:37 +00:00
NAKAMURA Takumi d477fe544c Makefile: Follow r118918, to add configuration "ENABLE_DOCS".
llvm-svn: 119025
2010-11-14 03:29:27 +00:00
NAKAMURA Takumi e82858299c test/CodeGenCXX/dyncast.cpp: Remove XFAIL:win32 with tweaking llvm/utils/FileCheck in r119023, due to DOSish crlf issue.
llvm-svn: 119024
2010-11-14 03:29:22 +00:00
NAKAMURA Takumi fd781bf043 FileCheck: Eliminate DOSish \r from input file.
It can pass two tests below on Win32.
  - Clang :: CodeGenCXX/dyncast.cpp
  - LLVM :: CodeGen/ARM/globals.ll

llvm-svn: 119023
2010-11-14 03:28:22 +00:00
Rafael Espindola 0e3decfcf7 Simplify getSymbolIndexInSymbolTable by setting the actual index of
the symbols.

llvm-svn: 119022
2010-11-14 03:12:24 +00:00
Rafael Espindola eba9022652 Fix warning.
llvm-svn: 119021
2010-11-14 01:34:31 +00:00
Greg Clayton 32d2a48369 Fixed an issue where we were trying to resolve lldb_private::Type encoding
types to their full definitions more than we needed to. This caused an assertion
in the DWARF parser to fire -- which is an indication that we are parsing too much.

llvm-svn: 119020
2010-11-14 01:03:55 +00:00
Greg Clayton d7e054694e Fixed a crasher (an assert was firing in the DWARF parser) when setting
breakpoints on inlined functions by name. This involved fixing the DWARF parser
to correctly back up and parse the concrete function when we find inlined
functions by name, then grabbing any appropriate inlined blocks and returning
symbol contexts with the block filled in. After this was fixed, the breakpoint
by name resolver needed to correctly deal with symbol contexts that had the
inlined block filled in in the symbol contexts.

llvm-svn: 119017
2010-11-14 00:22:48 +00:00
Fariborz Jahanian 9ffe24f186 Initialize couple of fields.
llvm-svn: 119014
2010-11-13 23:48:30 +00:00