Commit Graph

72844 Commits

Author SHA1 Message Date
Edward O'Callaghan 5fd452d596 Fix for PR5373, Credit to Jakub Staszak.
llvm-svn: 89758
2009-11-24 11:51:52 +00:00
Zhongxing Xu c2998766f0 We can remove this file now.
llvm-svn: 89751
2009-11-24 08:28:49 +00:00
Zhongxing Xu c6123a1a3c Refactor undefined result checker. This is the last one.
llvm-svn: 89750
2009-11-24 08:24:26 +00:00
Evan Cheng 184ec26fcd Enable predication of NEON instructions in Thumb2 mode.
llvm-svn: 89748
2009-11-24 08:06:15 +00:00
Zhongxing Xu 9e200798c2 Refactor NilReceiverStructRet and NilReceiverLargerThanVoidPtrRet into
CallAndMessageChecker.

llvm-svn: 89745
2009-11-24 07:06:39 +00:00
Kovarththanan Rajaratnam 506b89325c Remove trailing spaces
llvm-svn: 89744
2009-11-24 06:30:23 +00:00
Anders Carlsson 59486a2ddb Get rid of the ugly CGCXX names and replace them with CGClass, CGExprCXX and CGTemporaries.
llvm-svn: 89742
2009-11-24 05:51:11 +00:00
Anders Carlsson bd97548f35 When mangling a ctor/dtor we need to take into consideration whether it's a member template.
llvm-svn: 89741
2009-11-24 05:36:32 +00:00
Anders Carlsson 65e6d131f0 Set the template specialization kind before instantiating the function definition so that the function will have the right linkage.
llvm-svn: 89740
2009-11-24 05:34:41 +00:00
Eli Friedman fb8a93fe1d Teach Evaluate to handle member expressions referring to enum constants and
static member constants. No significant visible difference at the moment
because it conservatively assumes the base has side effects. I'm planning to
use this for CodeGen.

llvm-svn: 89738
2009-11-24 05:28:59 +00:00
Anders Carlsson 0ade9715f2 Ignore constructor member templates in CodeGenModule::EmitTopLevelDecl.
llvm-svn: 89737
2009-11-24 05:16:24 +00:00
Anders Carlsson 6445773279 It is common for vtables to contain pointers to functions that have either incomplete return types or incomplete argument types.
Handle this by returning the llvm::OpaqueType for those cases, which CodeGenModule::GetOrCreateLLVMFunction knows about, and treats as being an "incomplete function".

llvm-svn: 89736
2009-11-24 05:08:52 +00:00
Zhongxing Xu 72269ec8cb rename UndefinedArgChecker to CallAndMessageChecker.
llvm-svn: 89735
2009-11-24 04:45:44 +00:00
Zhongxing Xu da32375115 Rename: UndefinedArgChecker.cpp => CallAndMessageChecker.cpp
llvm-svn: 89734
2009-11-24 04:08:01 +00:00
Jeffrey Yasskin 9c2d34012d Oops. Re-disable JITTest.NoStubs on ARM and PPC since they still use stubs to
make far calls work.

llvm-svn: 89733
2009-11-24 02:11:14 +00:00
Dan Gohman cfb181d3cb Delete some dead and non-obvious code.
llvm-svn: 89729
2009-11-24 01:48:15 +00:00
Ted Kremenek c0229557dd Enhance null dereference diagnostics by indicating what variable (if any) was dereferenced. Addresses <rdar://problem/7039161>.
llvm-svn: 89726
2009-11-24 01:33:10 +00:00
Devang Patel 04d2f2d192 Emit pubtypes.
llvm-svn: 89725
2009-11-24 01:14:22 +00:00
Dale Johannesen 86dcae106d Make capitalization of names starting "is" more consistent.
No functional change.

llvm-svn: 89724
2009-11-24 01:09:07 +00:00
Evan Cheng ece825dc4f Data type suffix must come after predicate.
llvm-svn: 89723
2009-11-24 01:05:23 +00:00
David Goodwin 3f3a8b1c7e <rdar://problem/6721894>. Allow multiple registers to be renamed together (super and sub) if necessary to break an anti-dependence.
llvm-svn: 89722
2009-11-24 00:59:08 +00:00
Daniel Dunbar 8d731964d0 Sketch the rest of the clang -cc1 option definitions, aka fun with C-x C-(.
llvm-svn: 89721
2009-11-24 00:54:16 +00:00
Anton Korobeynikov 2522908653 Materialize global addresses via movt/movw pair, this is always better
than doing the same via constpool:
1. Load from constpool costs 3 cycles on A9, movt/movw pair - just 2.
2. Load from constpool might stall up to 300 cycles due to cache miss.
3. Movt/movw does not use load/store unit.
4. Less constpool entries => better compiler performance.

This is only enabled on ELF systems, since darwin does not have needed
relocations (yet).

llvm-svn: 89720
2009-11-24 00:44:37 +00:00
Jim Grosbach f890f51666 80 column violations
llvm-svn: 89718
2009-11-24 00:20:27 +00:00
Douglas Gregor 633caca353 Explicitly track the condition variable within an "if" statement,
rather than burying it in a CXXConditionDeclExpr (that occassionally
hides behind implicit conversions). Similar changes for
switch, while, and do-while will follow, then the removal of
CXXConditionDeclExpr. This commit is the canary.

llvm-svn: 89717
2009-11-23 23:44:04 +00:00
Daniel Dunbar 8a9fa3af69 Add clang -cc1 parsing of diagnostic options.
llvm-svn: 89716
2009-11-23 23:41:17 +00:00
Jeffrey Yasskin f2ad571443 * Move stub allocation inside the JITEmitter, instead of exposing a
way for each TargetJITInfo subclass to allocate its own stubs. This
means stubs aren't as exactly-sized anymore, but it lets us get rid of
TargetJITInfo::emitFunctionStubAtAddr(), which lets ARM and PPC
support the eager JIT, fixing http://llvm.org/PR4816.

* Rename the JITEmitter's stub creation functions to describe the kind
of stub they create. So far, all of them create lazy-compilation
stubs, but they sometimes get used when far-call stubs are needed.
Fixing http://llvm.org/PR5201 will involve fixing this.

llvm-svn: 89715
2009-11-23 23:35:19 +00:00
Jim Grosbach bf2956a88b enable iv-users simplification by default
llvm-svn: 89713
2009-11-23 23:25:54 +00:00
Ted Kremenek b0c0b08c71 After performing a bounds check in ArrayBoundChecker, record the fact that a bounds check succeeded by transitioning the ExplodedGraph.
llvm-svn: 89712
2009-11-23 23:23:26 +00:00
Dan Gohman de5dea869f Remove ISD::DEBUG_LOC and ISD::DBG_LABEL, which are no longer used.
Note that "hasDotLocAndDotFile"-style debug info was already broken;
people wanting this functionality should implement it in the
AsmPrinter/DwarfWriter code.

llvm-svn: 89711
2009-11-23 23:20:51 +00:00
Jeffrey Yasskin 19b48370fb Allow more than one stub to be being generated at the same time.
It's probably better in the long run to replace the
indirect-GlobalVariable system. That'll be done after a subsequent
patch.

llvm-svn: 89708
2009-11-23 22:49:00 +00:00
Ted Kremenek f57351570e Clean up the Checker API a little more, resolving some hidden bugs
along the way.  Important changes:

1) To generate a sink node, use GenerateSink(); GenerateNode() is for
generating regular transitions.  This makes the API clearer and also
allows us to use the 'bool' option to GenerateNode() for a different
purpose.

2) GenerateNode() now automatically adds the generated node to the
destination ExplodedNodeSet (autotransition) unless the client
specifies otherwise with a bool flag.  Several checkers did not call
'addTransition()' after calling 'GenerateNode()', causing the
simulation path to be prematurely culled when a non-fail stop bug was
encountered.

3) Add variants of GenerateNode()/GenerateSink() that take neither a
Stmt* or a GRState*; most callers of GenerateNode() just pass in the
same Stmt* as provided when the CheckerContext object is created; we
can just use that the majority of the time.  This cleanup also allows
us to potentially coelesce the APIs for evaluating branches and
end-of-paths (which currently directly use builders).

4) addTransition() no longer needs to be called except for a few
cases.  We now have a variant of addTransition() that takes a
GRState*; this allows one to propagate the updated state without
caring about generating a new node explicitly.  This nicely cleaned up
a bunch of cases that called autoTransition() with a bunch of
conditional logic surround the call (that common logic has now been
swallowed up by addTransition() itself).

llvm-svn: 89707
2009-11-23 22:22:01 +00:00
Evan Cheng 738a97a1db Massive refactoring of NEON instructions. Separate opcode from data size specifier suffix, move \t up stream to instruction format, and fix more 80 column violations.
This fixes the NEON asm printing so the "predicate" field is printed between the opcode and the data type suffix.

llvm-svn: 89706
2009-11-23 21:57:23 +00:00
Anders Carlsson f2e4f72f03 Don't try to treat an enum constant as an lvalue.
llvm-svn: 89705
2009-11-23 21:56:41 +00:00
Anders Carlsson 2e7bc11f11 Convert the && and || operands to bool using standard conversions. Fixes PR5593.
llvm-svn: 89704
2009-11-23 21:47:44 +00:00
Dan Gohman 3650f4ed0c Simplify this code.
llvm-svn: 89702
2009-11-23 21:30:55 +00:00
Dan Gohman 2e3f187cbd Print the debug info line and column in MachineInstr::print even when there's
no filename. This situation is apparently fairly common right now.

llvm-svn: 89701
2009-11-23 21:29:08 +00:00
Jim Grosbach dbb4140f37 move fconst[sd] to UAL. <rdar://7414913>
llvm-svn: 89700
2009-11-23 21:08:25 +00:00
Johnny Chen b6528d3244 Partially revert r84730 by removing N2VDup from ARMInstrFormats.td and modifying
VDUPLND and VDUPLNQ to derive from N2V instead of N2VDup.  VDUPLND and VDUPLNQ
now expect op19_18 and op17_16 as the first two args.

llvm-svn: 89699
2009-11-23 21:00:43 +00:00
Fariborz Jahanian d25c219475 Fixe a crash in encoding of SEL type caused by recent changes.
llvm-svn: 89696
2009-11-23 20:40:50 +00:00
Jim Grosbach 50b293d65e update test for 89694
llvm-svn: 89695
2009-11-23 20:39:53 +00:00
Jim Grosbach 04c0e76772 fold immediate of a + Const into the user as a subtract if it can fit as a negated two-part immediate.
llvm-svn: 89694
2009-11-23 20:35:53 +00:00
Johnny Chen 5ad7416260 Revert r84572 by removing N3VImm from ARMInstrFormats.td now that we can specify
{?,?,?,?} as op11_8 for VEXTd and VEXTq.

llvm-svn: 89693
2009-11-23 20:09:13 +00:00
Anders Carlsson 7fa434c2b8 Handle converting member pointers to bool.
llvm-svn: 89692
2009-11-23 20:04:44 +00:00
Fariborz Jahanian 3f21c159dc Fix a recent regression probably caused by addition of altivec-style
type-casts in the parser.

llvm-svn: 89691
2009-11-23 19:51:43 +00:00
Devang Patel 75e6a40d6d Add CreateLocation varinat that accepts MDNode (with a default value).
llvm-svn: 89689
2009-11-23 19:11:20 +00:00
Ted Kremenek b43737387b Provide out-of-line definition for destructor of Checker.
llvm-svn: 89688
2009-11-23 18:53:03 +00:00
Devang Patel b5b51598ba Revert r89487.
llvm-svn: 89686
2009-11-23 18:43:37 +00:00
Johnny Chen e97457afbc Partially revert r89377 by removing NLdStLN class definition from
ARMInstrFormats.td and fixing VLD[234]LN* and VST[234]LN* to derive from NLdSt
instead of NLdStLN.

llvm-svn: 89684
2009-11-23 18:16:16 +00:00
Dan Gohman 9d72cbf2d5 Move CopyCatchInfo into FunctionLoweringInfo.cpp too, for consistency.
llvm-svn: 89683
2009-11-23 18:12:11 +00:00