platform/upstream/llvm.git
12 years agoUpdate isl.
Tobias Grosser [Tue, 6 Dec 2011 10:48:32 +0000 (10:48 +0000)]
Update isl.

llvm-svn: 145933

12 years agoCodeGen: Style improvements.
Tobias Grosser [Tue, 6 Dec 2011 10:48:27 +0000 (10:48 +0000)]
CodeGen: Style improvements.

llvm-svn: 145932

12 years agoSuggest typo corrections for implicit function declarations.
Hans Wennborg [Tue, 6 Dec 2011 09:46:12 +0000 (09:46 +0000)]
Suggest typo corrections for implicit function declarations.

A mistyped function call becomes an inmplicit function declaration in C.
Suggest typo correction when one can be found.

llvm-svn: 145930

12 years agoAdd X86ISD::HADD/HSUB to getTargetNodeName
Craig Topper [Tue, 6 Dec 2011 09:31:36 +0000 (09:31 +0000)]
Add X86ISD::HADD/HSUB to getTargetNodeName

llvm-svn: 145929

12 years agoExtend warnings for missing '@end'.
Erik Verbruggen [Tue, 6 Dec 2011 09:25:23 +0000 (09:25 +0000)]
Extend warnings for missing '@end'.
Fixes PR2709.

llvm-svn: 145928

12 years agoFix a bunch of SSE/AVX patterns to use v2i64/v4i64 loads since all other integer...
Craig Topper [Tue, 6 Dec 2011 09:04:59 +0000 (09:04 +0000)]
Fix a bunch of SSE/AVX patterns to use v2i64/v4i64 loads since all other integer vector loads are promoted to those.

llvm-svn: 145927

12 years agoMerge floating point and integer UNPCK X86ISD node types.
Craig Topper [Tue, 6 Dec 2011 08:21:25 +0000 (08:21 +0000)]
Merge floating point and integer UNPCK X86ISD node types.

llvm-svn: 145926

12 years agotest/MC: Introduce MC/MachO/ARM, and relocate relax-thumb2-branches.s into it.
NAKAMURA Takumi [Tue, 6 Dec 2011 06:48:26 +0000 (06:48 +0000)]
test/MC: Introduce MC/MachO/ARM, and relocate relax-thumb2-branches.s into it.

FIXME: Restore more other arch-dependent MachO tests. (eg. r126401 and r133856)
llvm-svn: 145925

12 years agoClean up some of the shuffle decoding code for UNPCK instructions. Add instruction...
Craig Topper [Tue, 6 Dec 2011 05:31:16 +0000 (05:31 +0000)]
Clean up some of the shuffle decoding code for UNPCK instructions. Add instruction commenting for AVX/AVX2 forms for integer UNPCKs.

llvm-svn: 145924

12 years agoARM mode 'mul' operand ordering tweak.
Jim Grosbach [Tue, 6 Dec 2011 05:28:00 +0000 (05:28 +0000)]
ARM mode 'mul' operand ordering tweak.

Same as r145922, just for ARM mode.

llvm-svn: 145923

12 years agoThumb2: MUL two-operand form encoding operand order fix.
Jim Grosbach [Tue, 6 Dec 2011 05:03:45 +0000 (05:03 +0000)]
Thumb2: MUL two-operand form encoding operand order fix.

Fix the alias to encode 'mul r5, r6' as if it were 'mul r5, r6, r5' so we
match gas.

rdar://10532439

llvm-svn: 145922

12 years agoMerge isSHUFPMask and isCommutedSHUFPMask into single function that can do both....
Craig Topper [Tue, 6 Dec 2011 04:59:07 +0000 (04:59 +0000)]
Merge isSHUFPMask and isCommutedSHUFPMask into single function that can do both. Do the same for the 256-bit version. Use loops to reduce size of isVSHUFPYMask. Fix test cases that were incorrectly passing due to isCommutedSHUFPMask not checking for the vector being 128-bit. This caused some 256-bit shuffles to be incorrectly commuted.

llvm-svn: 145921

12 years ago<rdar://problem/10487848>
Greg Clayton [Tue, 6 Dec 2011 04:51:14 +0000 (04:51 +0000)]
<rdar://problem/10487848>

Protect a member variable from being modified by multiple threads.

llvm-svn: 145920

12 years agoThumb2 encoding choice correction for PLD.
Jim Grosbach [Tue, 6 Dec 2011 04:49:29 +0000 (04:49 +0000)]
Thumb2 encoding choice correction for PLD.

Using encoding T1 for offset of #0 and encoding T2 for #-0.

rdar://10532413

llvm-svn: 145919

12 years agoSwitch a cast to a dyn_cast and check the pointer before using. Fixes a crash
Richard Trieu [Tue, 6 Dec 2011 04:48:01 +0000 (04:48 +0000)]
Switch a cast to a dyn_cast and check the pointer before using.  Fixes a crash
in the following code:

void test4(bool (&x)(void)) {
  while (x);
}

llvm-svn: 145918

12 years agoSkip over lldb-93.
Jason Molenda [Tue, 6 Dec 2011 04:21:20 +0000 (04:21 +0000)]
Skip over lldb-93.

llvm-svn: 145917

12 years agotest/MC: Move relax-thumb2-branches.s from MC/MachO/ to MC/ARM.
NAKAMURA Takumi [Tue, 6 Dec 2011 03:56:05 +0000 (03:56 +0000)]
test/MC: Move relax-thumb2-branches.s from MC/MachO/ to MC/ARM.

MC/MachO assumes x86.

llvm-svn: 145916

12 years agoFix test for unrelated changes.
Nick Lewycky [Tue, 6 Dec 2011 03:46:28 +0000 (03:46 +0000)]
Fix test for unrelated changes.

llvm-svn: 145915

12 years agoAs part of the work to make Objective-C type information
Sean Callanan [Tue, 6 Dec 2011 03:41:14 +0000 (03:41 +0000)]
As part of the work to make Objective-C type information
from symbols more accessible, I have added a second
map to the ClangASTImporter: the ObjCInterfaceMetaMap.
This map keeps track of all type definitions found for
a particular Objective-C interface, allowing the
ClangASTSource to refer to all possible sources when
looking for method definitions.

There is a bug in lookup that I still need to figure out,
but after that we should be able to report full method
information for Objective-C classes shown in symbols.

Also fixed some errors I ran into when enabling the maps
for the persistent type store.  The persistent type store
previously did not use the ClangASTImporter to import
types, instead using ASTImporters that got allocated each
time a type needed copying.  To support the requirements
of the persistent type store -- namely, that types must be
copied, completed, and then completely severed from their
origin in the parser's AST context (which will go away) --
I added a new function called DeportType which severs all
these connections.

llvm-svn: 145914

12 years agoFix a subtle semantic issue with poison values that came up in
Dan Gohman [Tue, 6 Dec 2011 03:35:58 +0000 (03:35 +0000)]
Fix a subtle semantic issue with poison values that came up in
recent discussions. Poison can't make every value that depends on
it act in maximally undefined ways, because the optimizer may still
hoist code following the usual rules for undef. Make Poison invoke
its full undefined behavior only when it reaches an instruction with
externally visible side effects.

llvm-svn: 145913

12 years agoUse branches instead of jumps + variable cleanup. Testcase coming next. Patch by...
Bruno Cardoso Lopes [Tue, 6 Dec 2011 03:34:48 +0000 (03:34 +0000)]
Use branches instead of jumps + variable cleanup. Testcase coming next. Patch by Jack Carter

llvm-svn: 145912

12 years agoExplicit symbols for gnu mimicing relocations. Patch by Jack Carter
Bruno Cardoso Lopes [Tue, 6 Dec 2011 03:34:42 +0000 (03:34 +0000)]
Explicit symbols for gnu mimicing relocations. Patch by Jack Carter

llvm-svn: 145911

12 years agoAdd register HWR29 numbering. Patch by Jack Carter
Bruno Cardoso Lopes [Tue, 6 Dec 2011 03:34:36 +0000 (03:34 +0000)]
Add register HWR29 numbering. Patch by Jack Carter

llvm-svn: 145910

12 years agoStack realignment is a tristate. Add -mno-stackrealign to turn off all stack
Nick Lewycky [Tue, 6 Dec 2011 03:33:03 +0000 (03:33 +0000)]
Stack realignment is a tristate. Add -mno-stackrealign to turn off all stack
realignment, even with locals with alignment exceeding the ABI guarantee.

llvm-svn: 145909

12 years agoLine up the comments in a code example.
Dan Gohman [Tue, 6 Dec 2011 03:31:14 +0000 (03:31 +0000)]
Line up the comments in a code example.

llvm-svn: 145908

12 years agoRename "Trap Values" to "Poison Values", to better reflect their
Dan Gohman [Tue, 6 Dec 2011 03:18:47 +0000 (03:18 +0000)]
Rename "Trap Values" to "Poison Values", to better reflect their
purpose, and to avoid ambiguity with other uses of the word "trap"
in LangRef.

llvm-svn: 145907

12 years agoLSR: prune undesirable formulae early.
Andrew Trick [Tue, 6 Dec 2011 03:13:31 +0000 (03:13 +0000)]
LSR: prune undesirable formulae early.

It's always good to prune early, but formulae that are unsatisfactory
in their own right need to be removed before running any other pruning
heuristics. We easily avoid generating such formulae, but we need them
as an intermediate basis for forming other good formulae.

llvm-svn: 145906

12 years agoMinor comment update.
Eli Friedman [Tue, 6 Dec 2011 03:08:26 +0000 (03:08 +0000)]
Minor comment update.

llvm-svn: 145905

12 years agoFix an extremely stupid bug causing terrible miscompilations
John McCall [Tue, 6 Dec 2011 02:56:18 +0000 (02:56 +0000)]
Fix an extremely stupid bug causing terrible miscompilations
of &= on pseudo-objects.

llvm-svn: 145904

12 years agoMix some minor misuse of MachineBasicBlock iterator.
Evan Cheng [Tue, 6 Dec 2011 02:49:06 +0000 (02:49 +0000)]
Mix some minor misuse of MachineBasicBlock iterator.

llvm-svn: 145903

12 years agoRemoved isWinToJoinCrossClass from the register coalescer.
Pete Cooper [Tue, 6 Dec 2011 02:06:50 +0000 (02:06 +0000)]
Removed isWinToJoinCrossClass from the register coalescer.

The new register allocator is much more able to split back up ranges too constrained by register classes.

Fixes <rdar://problem/10466609>

llvm-svn: 145899

12 years agoallow TinyPtrVector to implicitly convert to ArrayRef.
Chris Lattner [Tue, 6 Dec 2011 02:00:33 +0000 (02:00 +0000)]
allow TinyPtrVector to implicitly convert to ArrayRef.

llvm-svn: 145898

12 years agoKill off the LoopSplitter. It's not being used or maintained.
Lang Hames [Tue, 6 Dec 2011 01:57:59 +0000 (01:57 +0000)]
Kill off the LoopSplitter. It's not being used or maintained.

llvm-svn: 145897

12 years agoAdd a comment.
Bill Wendling [Tue, 6 Dec 2011 01:57:48 +0000 (01:57 +0000)]
Add a comment.

llvm-svn: 145896

12 years agoTidy up value checking.
Jim Grosbach [Tue, 6 Dec 2011 01:53:17 +0000 (01:53 +0000)]
Tidy up value checking.

llvm-svn: 145895

12 years agoMipsAsmBackend.cpp, PPCAsmBackend.cpp: Fix -Asserts build to appease msvc.
NAKAMURA Takumi [Tue, 6 Dec 2011 01:48:32 +0000 (01:48 +0000)]
MipsAsmBackend.cpp, PPCAsmBackend.cpp: Fix -Asserts build to appease msvc.

llvm-svn: 145894

12 years agoUpdate PBQP's analysis usage to reflect the requirements of the inline spiller.
Lang Hames [Tue, 6 Dec 2011 01:45:57 +0000 (01:45 +0000)]
Update PBQP's analysis usage to reflect the requirements of the inline spiller.

llvm-svn: 145893

12 years agoSet a flag on the AST type dump to see Objective-C
Sean Callanan [Tue, 6 Dec 2011 01:44:41 +0000 (01:44 +0000)]
Set a flag on the AST type dump to see Objective-C
methods.  The Clang dump is now much more verbose,
but when somebody types "target modules lookup -t"
that is typically what they're looking for.

llvm-svn: 145892

12 years ago[arm-fast-isel] Doublewords only require word-alignment.
Chad Rosier [Tue, 6 Dec 2011 01:44:17 +0000 (01:44 +0000)]
[arm-fast-isel] Doublewords only require word-alignment.
rdar://10528060

llvm-svn: 145891

12 years agoAlign ARM constant pool islands via their basic block.
Jakob Stoklund Olesen [Tue, 6 Dec 2011 01:43:02 +0000 (01:43 +0000)]
Align ARM constant pool islands via their basic block.

Previously, all ARM::CONSTPOOL_ENTRY instructions had a hardwired
alignment of 4 bytes emitted by ARMAsmPrinter.  Now the same alignment
is set on the basic block.

This is in preparation of supporting ARM constant pool islands with
different alignments.

llvm-svn: 145890

12 years agoUse logarithmic units for basic block alignment.
Jakob Stoklund Olesen [Tue, 6 Dec 2011 01:26:19 +0000 (01:26 +0000)]
Use logarithmic units for basic block alignment.

This was actually a bit of a mess. TLI.setPrefLoopAlignment was clearly
documented as taking log2(bytes) units, but the x86 target would still
set a preferred loop alignment of '16'.

CodePlacementOpt passed this number on to the basic block, and
AsmPrinter interpreted it as bytes.

Now both MachineFunction and MachineBasicBlock use logarithmic
alignments.

Obviously, MachineConstantPool still measures alignments in bytes, so we
can emulate the thrill of using as.

llvm-svn: 145889

12 years agoThe compact encoding of the registers are 3-bits each. Make sure we shift the
Bill Wendling [Tue, 6 Dec 2011 01:26:14 +0000 (01:26 +0000)]
The compact encoding of the registers are 3-bits each. Make sure we shift the
value over that much.

llvm-svn: 145888

12 years agoImplement inferred submodules support, which (when requested)
Douglas Gregor [Tue, 6 Dec 2011 01:10:29 +0000 (01:10 +0000)]
Implement inferred submodules support, which (when requested)
implicitly generates submodules corresponding to the headers that fall
within a module.

llvm-svn: 145887

12 years ago[asan] remove format warnings in sysinfo/sysinfo.cc
Kostya Serebryany [Tue, 6 Dec 2011 01:08:31 +0000 (01:08 +0000)]
[asan] remove format warnings in sysinfo/sysinfo.cc

llvm-svn: 145886

12 years agoFix ARM handling of tBcc branch relaxation.
Jim Grosbach [Tue, 6 Dec 2011 01:08:19 +0000 (01:08 +0000)]
Fix ARM handling of tBcc branch relaxation.

rdar://10069056

llvm-svn: 145885

12 years agoCorrect typo in method name (AddSymbolFileRepresendation...)
Jim Ingham [Tue, 6 Dec 2011 01:07:22 +0000 (01:07 +0000)]
Correct typo in method name (AddSymbolFileRepresendation...)

llvm-svn: 145884

12 years agoUse an existing function.
Jakob Stoklund Olesen [Tue, 6 Dec 2011 00:51:12 +0000 (00:51 +0000)]
Use an existing function.

llvm-svn: 145883

12 years agoFix unclear wording.
Jakob Stoklund Olesen [Tue, 6 Dec 2011 00:51:09 +0000 (00:51 +0000)]
Fix unclear wording.

llvm-svn: 145882

12 years agoMove target-specific logic out of generic MCAssembler.
Jim Grosbach [Tue, 6 Dec 2011 00:47:03 +0000 (00:47 +0000)]
Move target-specific logic out of generic MCAssembler.

Whether a fixup needs relaxation for the associated instruction is a
target-specific function, as the FIXME indicated. Create a hook for that
and use it.

llvm-svn: 145881

12 years agoExpose a switch for the new gcov format.
Nick Lewycky [Tue, 6 Dec 2011 00:29:13 +0000 (00:29 +0000)]
Expose a switch for the new gcov format.

llvm-svn: 145880

12 years agoProbably not a good idea to convert a single vector load into a memcpy. We
Chad Rosier [Tue, 6 Dec 2011 00:19:08 +0000 (00:19 +0000)]
Probably not a good idea to convert a single vector load into a memcpy.  We
don't do this now, but add a test case to prevent this from happening in the
future.
Additional test for rdar://9892684

llvm-svn: 145879

12 years agoTidy up. Hard tabs.
Jim Grosbach [Tue, 6 Dec 2011 00:13:09 +0000 (00:13 +0000)]
Tidy up. Hard tabs.

llvm-svn: 145878

12 years agoTidy up. Hard tabs.
Jim Grosbach [Tue, 6 Dec 2011 00:12:12 +0000 (00:12 +0000)]
Tidy up. Hard tabs.

llvm-svn: 145877

12 years agoAll these arguments are default anyways.
Nick Lewycky [Tue, 6 Dec 2011 00:11:58 +0000 (00:11 +0000)]
All these arguments are default anyways.

llvm-svn: 145876

12 years agoTidy up. 80 columns.
Jim Grosbach [Tue, 6 Dec 2011 00:11:13 +0000 (00:11 +0000)]
Tidy up. 80 columns.

llvm-svn: 145875

12 years agoMake sure we perform lvalue-to-rvalue conversions for enum initializers. PR11484.
Eli Friedman [Tue, 6 Dec 2011 00:10:34 +0000 (00:10 +0000)]
Make sure we perform lvalue-to-rvalue conversions for enum initializers.  PR11484.

llvm-svn: 145874

12 years agoSwitch MCAssembler to method names starting w/ lower-case.
Jim Grosbach [Tue, 6 Dec 2011 00:03:48 +0000 (00:03 +0000)]
Switch MCAssembler to method names starting w/ lower-case.

per http://llvm.org/docs/CodingStandards.html#ll_naming

llvm-svn: 145873

12 years agoobjc: put out more coherent warning when method definition
Fariborz Jahanian [Tue, 6 Dec 2011 00:02:41 +0000 (00:02 +0000)]
objc: put out more coherent warning when method definition
attributes don't match its declaration. // rdar://10529259.

llvm-svn: 145872

12 years agoSimple branch relaxation for Thumb2 Bcc instructions.
Jim Grosbach [Mon, 5 Dec 2011 23:45:46 +0000 (23:45 +0000)]
Simple branch relaxation for Thumb2 Bcc instructions.

Not right yet, as the rules for when to relax in the MCAssembler aren't
(yet) correct for ARM. This is a step in the proper direction, though.

llvm-svn: 145871

12 years agoTidy up.
Jim Grosbach [Mon, 5 Dec 2011 23:20:14 +0000 (23:20 +0000)]
Tidy up.

llvm-svn: 145870

12 years agoSilence tsan false-positives (tsan can't track things which are only safe due to
Nick Lewycky [Mon, 5 Dec 2011 23:07:05 +0000 (23:07 +0000)]
Silence tsan false-positives (tsan can't track things which are only safe due to
memory fences) in statistics registration, which works the same way that
ManagedStatic registration does.

llvm-svn: 145869

12 years agoAdd -mstack-alignment=X and fix -mstackrealign handling now that the
Joerg Sonnenberger [Mon, 5 Dec 2011 23:05:23 +0000 (23:05 +0000)]
Add -mstack-alignment=X and fix -mstackrealign handling now that the
backend options are gone.

llvm-svn: 145868

12 years agoMore refactoring of objc rewriter.
Fariborz Jahanian [Mon, 5 Dec 2011 22:59:54 +0000 (22:59 +0000)]
More refactoring of objc rewriter.

llvm-svn: 145867

12 years agoUpdate comment.
Chad Rosier [Mon, 5 Dec 2011 22:53:09 +0000 (22:53 +0000)]
Update comment.

llvm-svn: 145866

12 years agoMake the MemCpyOptimizer a bit more aggressive. I can't think of a scenerio
Chad Rosier [Mon, 5 Dec 2011 22:37:00 +0000 (22:37 +0000)]
Make the MemCpyOptimizer a bit more aggressive.  I can't think of a scenerio
where this would be bad as the backend shouldn't have a problem inlining small
memcpys.
rdar://10510150

llvm-svn: 145865

12 years agoParse inferred submodules in module maps, track their contents in
Douglas Gregor [Mon, 5 Dec 2011 22:27:44 +0000 (22:27 +0000)]
Parse inferred submodules in module maps, track their contents in
Module, and (de-)serialize this information. Semantics of inferred
submodules to follow.

llvm-svn: 145864

12 years agoTweak ADDrr fix. Bad check for explicit .w
Jim Grosbach [Mon, 5 Dec 2011 22:27:04 +0000 (22:27 +0000)]
Tweak ADDrr fix. Bad check for explicit .w

llvm-svn: 145863

12 years agoMake EmitAggregateCopy take an alignment argument. Make EmitFinalDestCopy pass in...
Eli Friedman [Mon, 5 Dec 2011 22:23:28 +0000 (22:23 +0000)]
Make EmitAggregateCopy take an alignment argument.  Make EmitFinalDestCopy pass in the correct alignment when known.

The test includes a FIXME for a related case involving calls; it's a bit more complicated to fix because the RValue class doesn't keep track of alignment.

<rdar://problem/10463337>

llvm-svn: 145862

12 years agoUpdate tests for r145860. Add a few new ones.
Jim Grosbach [Mon, 5 Dec 2011 22:21:28 +0000 (22:21 +0000)]
Update tests for r145860. Add a few new ones.

llvm-svn: 145861

12 years agoThumb2 prefer ADD register encoding T2 to T3 when possible.
Jim Grosbach [Mon, 5 Dec 2011 22:16:39 +0000 (22:16 +0000)]
Thumb2 prefer ADD register encoding T2 to T3 when possible.

rdar://10529664

llvm-svn: 145860

12 years ago[libclang] When indexing a field in a C++ class, return an entity
Argyrios Kyrtzidis [Mon, 5 Dec 2011 22:05:28 +0000 (22:05 +0000)]
[libclang] When indexing a field in a C++ class, return an entity
of kind CXIdxEntity_CXXInstanceVariable. rdar://10522503.

llvm-svn: 145859

12 years ago[analyzer] Rely on LLVM Dominators in Clang dominator computation.
Anna Zaks [Mon, 5 Dec 2011 21:33:11 +0000 (21:33 +0000)]
[analyzer] Rely on LLVM Dominators in Clang dominator computation.

(Previously, Clang used it's implementation of dominators.)

The patch is contributed by Guoping Long!

llvm-svn: 145858

12 years ago[analyzer] Mark ConstraintManager::canReasonAbout as protected.
Anna Zaks [Mon, 5 Dec 2011 21:33:06 +0000 (21:33 +0000)]
[analyzer] Mark ConstraintManager::canReasonAbout as protected.

llvm-svn: 145857

12 years ago[analyzer] Simplify the condition.
Anna Zaks [Mon, 5 Dec 2011 21:33:01 +0000 (21:33 +0000)]
[analyzer] Simplify the condition.

This is a fixup for r145832.

The extra clauses do not matter after we remove the dependency on canReasonAbout(InitVal) in r145832.

llvm-svn: 145856

12 years ago[analyzer] Simplify the expected-warning statement.
Anna Zaks [Mon, 5 Dec 2011 21:32:58 +0000 (21:32 +0000)]
[analyzer] Simplify the expected-warning statement.

llvm-svn: 145855

12 years agoMove 'returns_twice' definition into alphabetical place.
Bill Wendling [Mon, 5 Dec 2011 21:27:54 +0000 (21:27 +0000)]
Move 'returns_twice' definition into alphabetical place.

llvm-svn: 145854

12 years agoAdd definitions of 64-bit extract and insert instrucions and make
Akira Hatanaka [Mon, 5 Dec 2011 21:26:34 +0000 (21:26 +0000)]
Add definitions of 64-bit extract and insert instrucions and make
PerformANDCombine and PerformOrCombine aware of them. Test cases are included
too.

llvm-svn: 145853

12 years agoSplit ExtIns into two base classes and have instructions EXT and INS derive from
Akira Hatanaka [Mon, 5 Dec 2011 21:14:28 +0000 (21:14 +0000)]
Split ExtIns into two base classes and have instructions EXT and INS derive from
them.

llvm-svn: 145852

12 years agoThumb2 prefer encoding T3 to T4 for ADD/SUB immediate instructions.
Jim Grosbach [Mon, 5 Dec 2011 21:06:26 +0000 (21:06 +0000)]
Thumb2 prefer encoding T3 to T4 for ADD/SUB immediate instructions.

rdar://10529348

llvm-svn: 145851

12 years agoHave LowerJumpTable support Mips64. Modify 2010-07-20-Switch.ll to test N64 and
Akira Hatanaka [Mon, 5 Dec 2011 21:03:03 +0000 (21:03 +0000)]
Have LowerJumpTable support Mips64. Modify 2010-07-20-Switch.ll to test N64 and
O32 with relocation-model=pic too.

llvm-svn: 145850

12 years agoAdd a warning for implicit conversion from function literals (and static
Lang Hames [Mon, 5 Dec 2011 20:49:50 +0000 (20:49 +0000)]
Add a warning for implicit conversion from function literals (and static
methods) to bool. E.g.

void foo() {}
if (f) { ... // <- Warns here.
}

Only applies to non-weak functions, and does not apply if the function address
is taken explicitly with the addr-of operator.

llvm-svn: 145849

12 years ago[asan]: test a pure C file with -faddress-sanitizer; lint fixes
Kostya Serebryany [Mon, 5 Dec 2011 20:44:30 +0000 (20:44 +0000)]
[asan]: test a pure C file with -faddress-sanitizer; lint fixes

llvm-svn: 145848

12 years agoARM assembly parsing for the rest of the VMUL data type aliases.
Jim Grosbach [Mon, 5 Dec 2011 20:29:59 +0000 (20:29 +0000)]
ARM assembly parsing for the rest of the VMUL data type aliases.

Finish up rdar://10522016.

llvm-svn: 145846

12 years agoMake isWeakDecl available as a method on ValueDecl.
Lang Hames [Mon, 5 Dec 2011 20:16:26 +0000 (20:16 +0000)]
Make isWeakDecl available as a method on ValueDecl.

llvm-svn: 145845

12 years agoFix previous commit. Oops.
Jim Grosbach [Mon, 5 Dec 2011 20:12:26 +0000 (20:12 +0000)]
Fix previous commit. Oops.

llvm-svn: 145844

12 years agoTidy up. No functional change.
Jim Grosbach [Mon, 5 Dec 2011 20:09:44 +0000 (20:09 +0000)]
Tidy up. No functional change.

llvm-svn: 145843

12 years agoARM assmebler parsing for two-operand VMUL instructions.
Jim Grosbach [Mon, 5 Dec 2011 19:55:46 +0000 (19:55 +0000)]
ARM assmebler parsing for two-operand VMUL instructions.

Combined destination and first source operand for f32 variant of the VMUL
(by scalar) instruction.

rdar://10522016

llvm-svn: 145842

12 years agoMore objc rewriter refactoring.
Fariborz Jahanian [Mon, 5 Dec 2011 19:50:04 +0000 (19:50 +0000)]
More objc rewriter refactoring.

llvm-svn: 145841

12 years agoSanity check the inputs to SBCommandInterpreter::HandleCompletion
Jim Ingham [Mon, 5 Dec 2011 19:24:15 +0000 (19:24 +0000)]
Sanity check the inputs to SBCommandInterpreter::HandleCompletion

llvm-svn: 145840

12 years ago[asan] add the test for bug 11468
Kostya Serebryany [Mon, 5 Dec 2011 19:20:57 +0000 (19:20 +0000)]
[asan] add the test for bug 11468

llvm-svn: 145839

12 years ago[asan] always collect malloc statstics (removed FLAG_stats)
Kostya Serebryany [Mon, 5 Dec 2011 19:17:53 +0000 (19:17 +0000)]
[asan] always collect malloc statstics (removed FLAG_stats)

llvm-svn: 145838

12 years agoChange the Dominators recalculate() function to only rely on GraphTraits
Anna Zaks [Mon, 5 Dec 2011 19:17:04 +0000 (19:17 +0000)]
Change the Dominators recalculate() function to only rely on GraphTraits

This is a patch by Guoping Long!

As part of utilizing LLVM Dominator computation in Clang, made two changes to LLVM dominators tree implementation:

 - (1) Change the recalculate() template function to only rely on GraphTraits.
 - (2) Add a size() method to GraphTraits template class to query the number of nodes in the graph.

llvm-svn: 145837

12 years ago[analyzer] Add a missing taint tester warning.
Anna Zaks [Mon, 5 Dec 2011 18:58:33 +0000 (18:58 +0000)]
[analyzer] Add a missing taint tester warning.

llvm-svn: 145834

12 years ago[analyzer] Unify SymbolVal and SymExprVal under a single SymbolVal
Anna Zaks [Mon, 5 Dec 2011 18:58:30 +0000 (18:58 +0000)]
[analyzer] Unify SymbolVal and SymExprVal under a single SymbolVal
class.

We are going into the direction of handling SymbolData and other SymExpr
uniformly, so it makes less sense to keep two different SVal classes.
For example, the checkers would have to take an extra step to reason
about each type separately.

The classes have the same members, we were just using the SVal kind
field for easy differentiation in 3 switch statements. The switch
statements look more ugly now, but we can make the code more readable in
other ways, for example, moving some code into separate functions.

llvm-svn: 145833

12 years ago[analyzer] Remove all uses of ConstraintManager::canResonAbout() from
Anna Zaks [Mon, 5 Dec 2011 18:58:25 +0000 (18:58 +0000)]
[analyzer] Remove all uses of ConstraintManager::canResonAbout() from
ExprEngine.

Teach SimpleConstraintManager::assumeSymRel() to propagate constraints
to symbolic expressions.

+ One extra warning (real bug) is now generated due to enhanced
assumeSymRel().

llvm-svn: 145832

12 years ago[analyzer] First step toward removing
Anna Zaks [Mon, 5 Dec 2011 18:58:19 +0000 (18:58 +0000)]
[analyzer] First step toward removing
ConstraintManager::canReasonAbout() from the ExprEngine.

ExprEngine should not care if the constraint solver can reason about
something or not. The solver should be able to handle all the SymExprs.

To do this, the solver should be able to keep track of not only the
SymbolData but of all SymExprs. This is why we change SymbolRef to be an
alias of SymExpr*. When encountering an expression it cannot simplify,
the solver should just add the constraints to it.

llvm-svn: 145831

12 years ago[analyzer] Minor improvements on RangeConstraint pretty-printing.
Anna Zaks [Mon, 5 Dec 2011 18:58:14 +0000 (18:58 +0000)]
[analyzer] Minor improvements on RangeConstraint pretty-printing.

llvm-svn: 145830

12 years ago[analyzer] Change RetainCountChecker to use symbol dump method instead
Anna Zaks [Mon, 5 Dec 2011 18:58:11 +0000 (18:58 +0000)]
[analyzer] Change RetainCountChecker to use symbol dump method instead
of relying on SymbolID.

This way any expression can be printed (not only SymbolData).

llvm-svn: 145829

12 years ago[analyzer] Add ability to do a simple ProgramState dump() without
Anna Zaks [Mon, 5 Dec 2011 18:58:08 +0000 (18:58 +0000)]
[analyzer] Add ability to do a simple ProgramState dump() without
requiring CFG.

Adding more ugly code; the evnvironment printing should be moved to
envirnment at some point.

llvm-svn: 145828

12 years ago[analyzer] Add a debug checker to test for tainted data.
Anna Zaks [Mon, 5 Dec 2011 18:58:01 +0000 (18:58 +0000)]
[analyzer] Add a debug checker to test for tainted data.

llvm-svn: 145827