Commit Graph

100840 Commits

Author SHA1 Message Date
Ted Kremenek c7bfdcd4f5 Fix memory leak in CFGBuilder resulting from tracking scope information using SmallVectors.
llvm-svn: 125550
2011-02-15 02:47:45 +00:00
Ken Dyck 7ad11e70b6 Convert RecordLayout::Alignment to CharUnits from bit units. No change in
functionality intended. 

llvm-svn: 125549
2011-02-15 02:32:40 +00:00
Ted Kremenek 4ea9004fe8 IdempotentOperationChecker: don't repeatedly recompute block reachability.
llvm-svn: 125548
2011-02-15 02:20:03 +00:00
Devang Patel 8d53ac81ec Do not forget DebugLoc!
llvm-svn: 125547
2011-02-15 02:02:30 +00:00
Chris Lattner 9f0ac0dd8b tidy up a bit.
llvm-svn: 125546
2011-02-15 01:56:08 +00:00
Fariborz Jahanian d33ab8c635 Warn if method for a deprecated method is implemented.
Warn if class for a deprecated class is implemented.
Warn if category for a deprecated class is implemented.
All under control of -Wdeprecated-implementations.
// rdar://8973810.

llvm-svn: 125545
2011-02-15 00:59:30 +00:00
Chris Lattner df01939065 Minor fixes to tutorial, patch by Benjamin Meyer!
llvm-svn: 125544
2011-02-15 00:24:32 +00:00
Chris Lattner 44e58526b9 fix comments
llvm-svn: 125543
2011-02-15 00:23:53 +00:00
Caroline Tice efb309619a Add code to emulate the STMDA Arm instruction.
llvm-svn: 125542
2011-02-15 00:19:42 +00:00
Greg Clayton e576ab2996 All UnwindPlan objects are now passed around as shared pointers.
ArchDefaultUnwindPlan plug-in interfaces are now cached per architecture 
instead of being leaked for every frame.

Split the ArchDefaultUnwindPlan_x86 into ArchDefaultUnwindPlan_x86_64 and
ArchDefaultUnwindPlan_i386 interfaces.

There were sporadic crashes that were due to something leaking or being 
destroyed when doing stack crawls. This patch should clear up these issues.

llvm-svn: 125541
2011-02-15 00:19:15 +00:00
Chris Lattner 91c08ad14a update for ConstantVector API change.
llvm-svn: 125538
2011-02-15 00:14:06 +00:00
Chris Lattner 69229316aa convert ConstantVector::get to use ArrayRef.
llvm-svn: 125537
2011-02-15 00:14:00 +00:00
Chris Lattner 84b2a40b4c fix some typos.
llvm-svn: 125536
2011-02-15 00:06:37 +00:00
Ted Kremenek 05e63e0e37 Put "incomplete implementation" warning under a flag.
llvm-svn: 125535
2011-02-14 23:59:16 +00:00
Bob Wilson 9cd0b581b8 Remove unused bitvectors that record ARM callee-saved registers.
llvm-svn: 125534
2011-02-14 23:40:38 +00:00
Johnny Chen 557520b996 Add missing logic (if BadReg(d) then UNPREDICTABLE;) for Encoding T2 of EmulateMovRdImm().
llvm-svn: 125533
2011-02-14 23:33:58 +00:00
John McCall fe9cf0abb7 Don't crash on hierarchy static_casts which appear in variable initializers.
PR9221.

llvm-svn: 125532
2011-02-14 23:21:33 +00:00
Johnny Chen 5623dc3559 Fix build warning (unused variable).
llvm-svn: 125531
2011-02-14 23:21:24 +00:00
Jakob Stoklund Olesen 1dd377d8c8 Move more fragments of spill weight calculation into CalcSpillWeights.h
Simplify the spill weight calculation a bit by bypassing
getApproximateInstructionCount() and using LiveInterval::getSize() directly.
This changes the computed spill weights, but only by a constant factor in each
function. It should not affect how spill weights compare against each other, and
so it shouldn't affect code generation.

llvm-svn: 125530
2011-02-14 23:15:38 +00:00
Devang Patel 3058398655 Do not hoist @llvm.dbg.value. Here, @llvm.dbg.value is "referring" a value that is modified inside loop.
llvm-svn: 125529
2011-02-14 23:03:23 +00:00
Caroline Tice eccad4d005 - Rearrange instruction emulation contexts to use a union for the
various types and numbers of arguments rather than trying to keep a
  constant number of arguments for all the types.

- Also create a Register type within the instructions, to hold
  register type and number.

- Modify EmulateInstructionArm.cpp to use the new register and context
  types in all the instruction emulation functions.

- Add code to emulate the STM Arm instruction.

llvm-svn: 125528
2011-02-14 23:03:21 +00:00
Johnny Chen dacc14c995 Updated README file.
llvm-svn: 125527
2011-02-14 22:25:44 +00:00
Rafael Espindola 70d8015063 Switch llvm to using comdats. For now always use groups with a single
section.

llvm-svn: 125526
2011-02-14 22:23:49 +00:00
Bob Wilson 60f50bc9f1 PR9139: Specify ARM/Darwin triple for vector-DAGCombine.ll test.
The i64_buildvector test in this file relies on the alignment of i64 and
f64 types being the same, which is true for Darwin but not AAPCS.

llvm-svn: 125525
2011-02-14 22:12:50 +00:00
Johnny Chen c3ba12d8e8 Add entries for EmulateMovRdImm() -- "MOV (immediate)" -- Encodings T1 & T2 into g_thumb_opcodes
table.  Modify EmulateInstructionARM::EvaluateInstruction() so that if the cpsr has changed
during evaluate instruction, we flush out the change into m_inst_cpsr in preparation for the next
instruction.

llvm-svn: 125524
2011-02-14 22:04:25 +00:00
Evan Cheng 9bf3f8e08b Fix PR8854. Track inserted copies to avoid read before write. Sorry, it's hard to reduce a sensible small test case.
llvm-svn: 125523
2011-02-14 21:50:37 +00:00
Greg Clayton c2448f6175 Added support for Xcode 4 build directories.
llvm-svn: 125522
2011-02-14 21:17:06 +00:00
Bruno Cardoso Lopes 57a522f30d A fail to match coprocessor number and register number must fail instead of assert.
llvm-svn: 125521
2011-02-14 21:10:33 +00:00
Johnny Chen 86776147ff Add impl for EmulateMvnRdImm() -- "MVN (immediate)". Plus zero out the arg0 field of
the context of eContextImmediate type, since the immediate value is known from the
argument value to WriteRegisterUnsigned() callback already.

llvm-svn: 125518
2011-02-14 20:39:01 +00:00
John McCall 2957e3ef49 Change the context correctly when instantiating a static data member definition.
llvm-svn: 125517
2011-02-14 20:37:25 +00:00
Oscar Fuentes c9987fbbfe Add current binary and source directories to the header search list
for all compiler invocations.

llvm-svn: 125514
2011-02-14 20:14:11 +00:00
Oscar Fuentes 210b06a213 Add current binary and source directories to the header search list
for all compiler invocations.

llvm-svn: 125513
2011-02-14 20:13:58 +00:00
Argyrios Kyrtzidis 2f9a5a46a5 Anger the CMake gods by updating 'clang.xcodeproj'.
llvm-svn: 125512
2011-02-14 20:09:57 +00:00
Howard Hinnant a0fe8c436e Chris Jefferson noted many places where function calls needed to be qualified (thanks Chris).
llvm-svn: 125510
2011-02-14 19:12:38 +00:00
Johnny Chen ac407594c2 Add comment.
llvm-svn: 125509
2011-02-14 19:09:36 +00:00
Johnny Chen e2b86a3a83 Enhanced the existing ARMExpandImm() and ThumbExpandImm() functions which expand
an imm12 into imm32 for ARM or Thumb so that they now handle carry_in/carry_out.
Funnel ARMExpandImm()/ThumbExpandImm() to the enhanced ARMExpandImm_C()/ThumbExpandImm_C()
functions.

llvm-svn: 125508
2011-02-14 19:08:41 +00:00
Argyrios Kyrtzidis f0619868ae Remove left-over #include.
llvm-svn: 125507
2011-02-14 19:02:35 +00:00
John McCall 909acf8209 Provide overload diagnostics when explicit casts involving class types fail.
PR8626.

llvm-svn: 125506
2011-02-14 18:34:10 +00:00
Chris Lattner dd68bd0a65 revert my ConstantVector patch, it seems to have made the llvm-gcc
builders unhappy.

llvm-svn: 125505
2011-02-14 18:16:09 +00:00
Chris Lattner 34442e6ebf revert my ConstantVector patch, it seems to have made the llvm-gcc
builders unhappy.

llvm-svn: 125504
2011-02-14 18:15:46 +00:00
Argyrios Kyrtzidis 556c45e9c5 [analyzer] Overhauling of the checker registration mechanism.
-Checkers will be defined in the tablegen file 'Checkers.td'.
-Apart from checkers, we can define checker "packages" that will contain a collection of checkers.
-Checkers can be enabled with -analyzer-checker=<name> and disabled with -analyzer-disable-checker=<name> e.g:
	Enable checkers from 'cocoa' and 'corefoundation' packages except the self-initialization checker:
	-analyzer-checker=cocoa -analyzer-checker=corefoundation -analyzer-disable-checker=cocoa.SelfInit
-Introduces CheckerManager and CheckerProvider. CheckerProviders get the set of checker names to enable/disable and
 register them with the CheckerManager which will be the entry point for all checker-related functionality.

Currently only the self-initialization checker takes advantage of the new mechanism.

llvm-svn: 125503
2011-02-14 18:13:31 +00:00
Argyrios Kyrtzidis 4ec3cf9937 [analyzer] Remove ManagerRegistry which is not used. In the future we may load analyzer plugins dynamically but
registration through static constructors should be avoided.

llvm-svn: 125502
2011-02-14 18:13:17 +00:00
Argyrios Kyrtzidis 2ef5f3c1c5 [analyzer] Move include/clang/StaticAnalyzer/AnalysisConsumer.h -> lib/StaticAnalyzer/Frontend/AnalysisConsumer.h since
FrontendActions.cpp is the only user.

llvm-svn: 125501
2011-02-14 18:13:11 +00:00
Argyrios Kyrtzidis ae92c95d34 [analyzer] Move Checkers/FrontendActions.cpp -> Frontend/FrontendActions.cpp
llvm-svn: 125500
2011-02-14 18:13:06 +00:00
Argyrios Kyrtzidis ecd3334dac [analyzer] Introduce libclangStaticAnalyzerFrontend and move Checkers/AnalysisConsumer.cpp into Frontend lib.
llvm-svn: 125499
2011-02-14 18:13:01 +00:00
Howard Hinnant bd356a8011 Update testit to default to clang
llvm-svn: 125498
2011-02-14 18:06:10 +00:00
Ted Kremenek 3374e03344 Remove dead code in IdempotentOperationChecker.
llvm-svn: 125497
2011-02-14 18:05:07 +00:00
Ted Kremenek 5794ef6950 Fix edge case where we don't cull warnings in IdempotentOperationsChecker due to incomplete analysis of loops.
llvm-svn: 125495
2011-02-14 17:59:23 +00:00
Ted Kremenek a71d5d31a1 Use 'BitVector' instead of SmallPtrSet<CFGBlock*> in IdempotentOperationsChecker. No real functionality change.
llvm-svn: 125494
2011-02-14 17:59:20 +00:00
Argyrios Kyrtzidis 485969638f Add the ClangSACheckersEmitter tablegen backend which will be used for the clang static analyzer.
llvm-svn: 125493
2011-02-14 17:58:52 +00:00