Commit Graph

82284 Commits

Author SHA1 Message Date
Dan Gohman 8422e57baa Delete now-unnecessary const_casts.
llvm-svn: 101637
2010-04-17 15:32:28 +00:00
Dan Gohman 20e094c711 Use cast instead of dyn_cast when assuming success.
llvm-svn: 101636
2010-04-17 15:31:16 +00:00
Dan Gohman 21cea8ac2e Use const qualifiers with TargetLowering. This eliminates several
const_casts, and it reinforces the design of the Target classes being
immutable.

SelectionDAGISel::IsLegalToFold is now a static member function, because
PIC16 uses it in an unconventional way. There is more room for API
cleanup here.

And PIC16's AsmPrinter no longer uses TargetLowering.

llvm-svn: 101635
2010-04-17 15:26:15 +00:00
Dan Gohman 31ae586c74 Move per-function state out of TargetLowering subclasses and into
MachineFunctionInfo subclasses.

llvm-svn: 101634
2010-04-17 14:41:14 +00:00
Benjamin Kramer 95c7c427aa Add printName to DeclarationName which prints the human-readable name on a
raw_ostream. Use it in getAsString and NamedDecl's raw_ostream operator.

llvm-svn: 101633
2010-04-17 09:56:45 +00:00
Benjamin Kramer b11416d061 Add raw_ostream operators to NamedDecl for convenience. Switch over all users of getNameAsString on a stream.
The next step is to print the name directly into the stream, avoiding a temporary std::string copy.

llvm-svn: 101632
2010-04-17 09:33:03 +00:00
Chandler Carruth ca0a53ac52 Name these stub files consistently with the SPU and PPC targets' conventions.
Also rename the classes appropriately. The CMake build already used these
names.

llvm-svn: 101631
2010-04-17 08:50:29 +00:00
Chris Lattner 7f5088e6de a bunch of ssse3 instructions are misencoded to think they have an
i8 field when they really do not.  This fixes rdar://7840289

llvm-svn: 101629
2010-04-17 07:38:24 +00:00
Chris Lattner 7c4f14bf90 reenable r101565, removing a problematic assertion.
CGSCC can delete nodes in regions of the callgraph that
have already been visited.  If new CG nodes are allocated
to the same pointer, we shouldn't abort, just handle it
correctly by assigning a new number.  This should restore
stability by removing invalidated pointers that *will* be
reused from the densemap in the iterator.

llvm-svn: 101628
2010-04-17 07:17:19 +00:00
Evan Cheng 5fdb57cc10 Postra machine licm must add registers defined by loop invariants to *all* of
the live-in sets of BBs in the loop. Otherwise later pass may end up using the
registers and override the invariant. rdar://7852937
No reasonablly sized test case possible.

llvm-svn: 101626
2010-04-17 07:07:11 +00:00
Nick Lewycky 04b8eec241 Refresh this documentation. Things have changed a bit in the mean time:
- LLVMgold.so --> libLLVMgold.so
 - the GCC LTO project is no longer 'upcoming'
 - document the plugin support for 'ar' and 'nm'

llvm-svn: 101624
2010-04-17 07:00:24 +00:00
Chris Lattner b714a4b4a0 revert r101568, which miscompiles this testcase, distilled from ldecod:
void exit_picture()
{
  char yuv_types[4][6]= {"4:0:0","4:2:0","4:2:2","4:4:4"};
  foo(yuv_types);
}

llvm-svn: 101623
2010-04-17 06:53:44 +00:00
Evan Cheng 4f3aba431e Fix codegen passes. -disable-ssc shouldn't disable postra machine licm.
llvm-svn: 101622
2010-04-17 06:47:47 +00:00
Evan Cheng f1bd5fcdb4 More work to allow dag combiner to promote 16-bit ops to 32-bit.
llvm-svn: 101621
2010-04-17 06:13:15 +00:00
Evan Cheng 829c300ce0 Another 80 col violation.
llvm-svn: 101620
2010-04-17 06:12:32 +00:00
Daniel Dunbar 88534f4201 Driver: Add missing claim() for -mllvm options.
llvm-svn: 101618
2010-04-17 06:10:00 +00:00
Bob Wilson 59b70eacad Revise my previous change to ExpandBIT_CONVERT. I hadn't realized that this
may be called when either the source or destination type is i64, and my
change also hadn't fixed the most obvious problem -- assuming that i64 will
only be bitconverted to f64, ignoring the various vector types.
Radar 7873160.

llvm-svn: 101615
2010-04-17 05:30:19 +00:00
Evan Cheng 3af19e80c9 Add nounwind.
llvm-svn: 101613
2010-04-17 03:43:36 +00:00
Bob Wilson ca51425d94 Re-commit my previous SSAUpdater changes. The previous version naively tried
to determine where to place PHIs by iteratively comparing reaching definitions
at each block.  That was just plain wrong.  This version now computes the
dominator tree within the subset of the CFG where PHIs may need to be placed,
and then places the PHIs in the iterated dominance frontier of each definition.
The rest of the patch is mostly the same, with a few more performance
improvements added in.

llvm-svn: 101612
2010-04-17 03:08:24 +00:00
Eric Christopher 0dd32fe068 New test to verify that we see constant integers here.
llvm-svn: 101611
2010-04-17 02:36:08 +00:00
Eric Christopher 8d0c621ca6 Consolidate most of the integer constant expression builtin requirement
checking into a single function and use that throughout. Remove some
now unnecessary diagnostics and update tests with now more accurate
diagnostics.

llvm-svn: 101610
2010-04-17 02:26:23 +00:00
Bob Wilson 4e5eb5ae1b As a temporary workaround for post-RA not handling DebugValue instructions,
just remove them all.  Radar 7873207 (working around the root problem of
Radar 7759363).

llvm-svn: 101604
2010-04-17 00:49:11 +00:00
Jakob Stoklund Olesen 71336f213b Revert "Use a simpler data structure to calculate the least recently used register in RegAllocLocal."
This reverts commit 101392. It broke a buildbot.

llvm-svn: 101595
2010-04-17 00:38:36 +00:00
Ted Kremenek 6542feb92c Wrap 'data' key in quotes.
llvm-svn: 101594
2010-04-17 00:37:35 +00:00
Ted Kremenek 9e9dd5c535 Make script actually work.
llvm-svn: 101591
2010-04-17 00:33:24 +00:00
Ted Kremenek bfd5a75b1c Log code completion data in json format.
llvm-svn: 101587
2010-04-17 00:21:44 +00:00
Ted Kremenek cab334cc90 Send code completion data in json format.
llvm-svn: 101586
2010-04-17 00:21:42 +00:00
Ted Kremenek 551c178efc Remove unneeded assertion and don't return a null CXString.
llvm-svn: 101585
2010-04-17 00:21:38 +00:00
Dale Johannesen 2543e303e1 Reapply 101503+101520. These are "obviously correct" [Chris]
and don't cause any problems on Darwin.

llvm-svn: 101584
2010-04-17 00:08:21 +00:00
Chris Lattner dddbcba270 disable r101565: an assert is getting triggered. More lurking badness no doubt.
llvm-svn: 101583
2010-04-17 00:05:36 +00:00
Chris Lattner cfc921cd2a add a note
llvm-svn: 101581
2010-04-16 23:52:30 +00:00
Chris Lattner 1cf5bdd03d emit warn_char_constant_too_large at most once per literal, fixing PR6852
llvm-svn: 101580
2010-04-16 23:44:05 +00:00
Eric Christopher 7258dcd77f Revert 101465, it broke internal OpenGL testing.
Probably the best way to know that all getOperand() calls have been handled
is to replace that API instead of updating.

llvm-svn: 101579
2010-04-16 23:37:20 +00:00
Chris Lattner 4ebae65d6a make our existing "switch on bool" warning work for C. Since
the result of comparisons are 'int' in C, it doesn't work to
test just the result type of the expression.

llvm-svn: 101576
2010-04-16 23:34:13 +00:00
Devang Patel 12563b3495 Add support to emit dwarf ranges.
llvm-svn: 101575
2010-04-16 23:33:45 +00:00
Jakob Stoklund Olesen ae372e2ce0 Use a simpler data structure to calculate the least recently used register in RegAllocLocal.
This makes the local register allocator about 20% faster.

llvm-svn: 101574
2010-04-16 23:32:37 +00:00
Johnny Chen c275414575 Cast to (uint64_t) instead of relying on the "ul" suffix.
llvm-svn: 101573
2010-04-16 23:30:28 +00:00
Douglas Gregor 24f27696db If a non-noreturn virtual member function is guaranteed not to return,
do *not* suggest that the function could be attribute 'noreturn';
overridden functions may end up returning.

llvm-svn: 101572
2010-04-16 23:28:44 +00:00
Douglas Gregor 19175ffb67 Switch Sema::FindCompositePointerType() over to InitializationSequence.
This is the last of the uses of TryImplicitConversion outside of
overload resolution and InitializationSequence itself.

llvm-svn: 101569
2010-04-16 23:20:25 +00:00
Nuno Lopes 74b595256a fix PR6766: codegen of var initialized with wide char
llvm-svn: 101568
2010-04-16 23:19:41 +00:00
Dan Gohman 37df662b1c Add a getSelectionDAGInfo member to TargetMachine.
llvm-svn: 101567
2010-04-16 23:09:10 +00:00
Chris Lattner 434c053439 update docs for api change.
llvm-svn: 101566
2010-04-16 23:07:44 +00:00
Chris Lattner de023a3c1d building on the new CallGraphSCC abstraction, teach CallGraphSCCPassManager
to keep the node entries in scc_iterator up to date instead of dangling as
the SCC mutates.

This is a really terrible problem which was causing -g to affect codegen 
because it would permute the memory image of the compiler process.

Thanks to Dale for expertly hunting it down.

llvm-svn: 101565
2010-04-16 23:04:30 +00:00
Dan Gohman 9becdddc49 Add skeleton target-specific SelectionDAGInfo files.
llvm-svn: 101564
2010-04-16 23:04:22 +00:00
Johnny Chen ed9bee150b Fixed logic error. Should check Builder for validity before calling SetSession
on it.

llvm-svn: 101563
2010-04-16 23:02:25 +00:00
Chris Lattner 5518b81a98 move ReplaceNode out of line, rename scc_iterator::fini -> isAtEnd().
No functionality change.

llvm-svn: 101562
2010-04-16 22:59:24 +00:00
Dan Gohman fe051a525f Regenerate configure script.
llvm-svn: 101561
2010-04-16 22:59:06 +00:00
Dan Gohman 91f8ad7bd3 Add an autoconf check for -retain-symbols-file and conditionalize
use of that option with it. This eliminates an imprecise "Linux"
test, and should help support old versions of gold.

llvm-svn: 101560
2010-04-16 22:58:15 +00:00
Johnny Chen 034e0b1e68 Minor change to make the test case comply with Vd<0> == '0' when Q == '1'.
llvm-svn: 101559
2010-04-16 22:48:31 +00:00
Chris Lattner 4422d31b84 introduce a new CallGraphSCC class, and pass it around
to CallGraphSCCPass's instead of passing around a
std::vector<CallGraphNode*>.  No functionality change,
but now we have a much tidier interface.

llvm-svn: 101558
2010-04-16 22:42:17 +00:00