platform/upstream/llvm.git
11 years agoMoving CFBag and NSBundle summaries from Python to C++
Enrico Granata [Fri, 15 Mar 2013 18:44:08 +0000 (18:44 +0000)]
Moving CFBag and NSBundle summaries from Python to C++

Temporarily disabled non-code-running summaries for CF*Dictionary and NSCountedSet

llvm-svn: 177171

11 years agoARM cost model: Fix costs for some vector selects
Arnold Schwaighofer [Fri, 15 Mar 2013 18:31:01 +0000 (18:31 +0000)]
ARM cost model: Fix costs for some vector selects

I was too pessimistic in r177105. Vector selects that fit into a legal register
type lower just fine. I was mislead by the code fragment that I was using. The
stores/loads that I saw in those cases came from lowering the conditional off
an address.

Changing the code fragment to:

%T0_3 = type <8 x i18>
%T1_3 = type <8 x i1>

define void @func_blend3(%T0_3* %loadaddr, %T0_3* %loadaddr2,
                         %T1_3* %blend, %T0_3* %storeaddr) {
  %v0 = load %T0_3* %loadaddr
  %v1 = load %T0_3* %loadaddr2
==> FROM:
  ;%c = load %T1_3* %blend
==> TO:
  %c = icmp slt %T0_3 %v0, %v1
==> USE:
  %r = select %T1_3 %c, %T0_3 %v0, %T0_3 %v1

  store %T0_3 %r, %T0_3* %storeaddr
  ret void
}

revealed this mistake.

radar://13403975

llvm-svn: 177170

11 years agoAdding an A15 specific optimization pass for interactions between S/D/Q registers...
Silviu Baranga [Fri, 15 Mar 2013 18:28:25 +0000 (18:28 +0000)]
Adding an A15 specific optimization pass for interactions between S/D/Q registers. The pass handles all the required transformations pre-regalloc.

llvm-svn: 177169

11 years agoPrevent nullptr_t-typed exprs from being replaced
Edwin Vane [Fri, 15 Mar 2013 18:10:07 +0000 (18:10 +0000)]
Prevent nullptr_t-typed exprs from being replaced

The Use-Nullptr transform was replacing nullptr_t-typed expressions because in
the AST such expressions have an implicit NullToPointer cast around them. Now
the transform ignores these expressions.

Fixes PR15414.

llvm-svn: 177168

11 years agoARM: Fix an old refacto.
Benjamin Kramer [Fri, 15 Mar 2013 17:27:39 +0000 (17:27 +0000)]
ARM: Fix an old refacto.

Fixes PR15520.

llvm-svn: 177167

11 years ago<rdar://problem/13194155>
Enrico Granata [Fri, 15 Mar 2013 17:25:04 +0000 (17:25 +0000)]
<rdar://problem/13194155>

Fixing an issue where threads and frames could get out of sync and cause ValueObjects to fail to retrieve their values correctly

llvm-svn: 177166

11 years agoRevert "Remove a pointless assertion."
Bob Wilson [Fri, 15 Mar 2013 17:12:43 +0000 (17:12 +0000)]
Revert "Remove a pointless assertion."

This reverts commit r177158.

I'm blindly reverting this because it appears to be breaking numerous
buildbots.  I'll reapply if it doesn't turn out to be the culprit.

llvm-svn: 177165

11 years agoForce column info only for direct inlined functions. This should strike
Adrian Prantl [Fri, 15 Mar 2013 17:09:05 +0000 (17:09 +0000)]
Force column info only for direct inlined functions. This should strike
the balance between expected behavior and compatibility with the gdb
testsuite.
(GDB gets confused if we break an expression into multiple debug
stmts so we enable this behavior only for inlined functions. For the
full experience people can still use -gcolumn-info.)

llvm-svn: 177164

11 years agoc: Also chek for integer overflow for '%' operator.
Fariborz Jahanian [Fri, 15 Mar 2013 17:03:56 +0000 (17:03 +0000)]
c: Also chek for integer overflow for '%' operator.

llvm-svn: 177163

11 years agoc: add the missing binary operatory when checking
Fariborz Jahanian [Fri, 15 Mar 2013 16:36:04 +0000 (16:36 +0000)]
c: add the missing binary operatory when checking
for integer overflow. // rdar://13423975

llvm-svn: 177162

11 years agoTake in account the triplet 'powerpc-linux-gnuspe' for PowerPC SPE. Done for the...
Sylvestre Ledru [Fri, 15 Mar 2013 16:22:43 +0000 (16:22 +0000)]
Take in account the triplet 'powerpc-linux-gnuspe' for PowerPC SPE. Done for the port of Debian on this arch. More information on: wiki.debian.org/PowerPCSPEPort Patch by Roland Stigge

llvm-svn: 177161

11 years agoEnable unaligned memory access on PPC for scalar types
Hal Finkel [Fri, 15 Mar 2013 15:27:13 +0000 (15:27 +0000)]
Enable unaligned memory access on PPC for scalar types

Unaligned access is supported on PPC for non-vector types, and is generally
more efficient than manually expanding the loads and stores.

A few of the existing test cases were using expanded unaligned loads and stores
to test other features (like load/store with update), and for these test cases,
unaligned access remains disabled.

llvm-svn: 177160

11 years agoARM cost model: Fix cost of fptrunc and fpext instructions
Arnold Schwaighofer [Fri, 15 Mar 2013 15:10:47 +0000 (15:10 +0000)]
ARM cost model: Fix cost of fptrunc and fpext instructions

A vector fptrunc and fpext simply gets split into scalar instructions.

radar://13192358

llvm-svn: 177159

11 years agoRemove a pointless assertion.
Nico Weber [Fri, 15 Mar 2013 15:02:37 +0000 (15:02 +0000)]
Remove a pointless assertion.

FindNodeOrInsertPos() is called 10 lines earlier already, and the function
early-returns there if the result is != 0. InsertPos isn't recomputed after
that check, so this assert is always trivially true. (And it has nothing to
do with if T is canonical or not.)

llvm-svn: 177158

11 years agoImprove formatting of chained calls.
Daniel Jasper [Fri, 15 Mar 2013 14:57:30 +0000 (14:57 +0000)]
Improve formatting of chained calls.

clang-format already prevented sequences like:
  ...
  SomeParameter).someFunction(
  ...

as those are quite confusing. This failed on:
  ...
  SomeParameter).someFunction(otherFunction(
  ...

Fixed in this patch.

llvm-svn: 177157

11 years ago[libsanitizer] StopTheWorld in sanitizer_common
Alexander Potapenko [Fri, 15 Mar 2013 14:37:21 +0000 (14:37 +0000)]
[libsanitizer] StopTheWorld in sanitizer_common

StopTheWorld puts the process in a suspended state before running the
user-supplied callback. To be used in TSan and in leak checking code.

Linux implementation provided.

Patch by Sergey Matveev (earthdok@google.com)

llvm-svn: 177156

11 years ago[Sanitizer] Don't intercept frexpf and frexpl on Windows. Add frexp declaration to...
Alexey Samsonov [Fri, 15 Mar 2013 14:02:21 +0000 (14:02 +0000)]
[Sanitizer] Don't intercept frexpf and frexpl on Windows. Add frexp declaration to asan_intercepted_functions.h

llvm-svn: 177155

11 years ago[TSan] Switch TSan runtime to use ThreadRegistry class from sanitizer_common
Alexey Samsonov [Fri, 15 Mar 2013 13:48:44 +0000 (13:48 +0000)]
[TSan] Switch TSan runtime to use ThreadRegistry class from sanitizer_common

llvm-svn: 177154

11 years agoIndent all lines in a multi-line comment by the same amount.
Alexander Kornienko [Fri, 15 Mar 2013 13:42:02 +0000 (13:42 +0000)]
Indent all lines in a multi-line comment by the same amount.

Summary:
Do this to avoid spoling nicely formatted multi-line comments (e.g.
with code examples or similar stuff).

Reviewers: djasper

Reviewed By: djasper

CC: cfe-commits, klimek
Differential Revision: http://llvm-reviews.chandlerc.com/D544

llvm-svn: 177153

11 years agoProtect PPC Altivec patterns with a predicate
Hal Finkel [Fri, 15 Mar 2013 13:21:21 +0000 (13:21 +0000)]
Protect PPC Altivec patterns with a predicate

In preparation for the addition of other SIMD ISA extensions (such as QPX) we
need to make sure that all Altivec patterns are properly predicated on having
Altivec support.

No functionality change intended (one test case needed to be updated b/c it
assumed that Altivec intrinsics would be supported without enabling Altivec
support).

llvm-svn: 177152

11 years ago[Sanitizer] Don't link tests with -lpthread on Android.
Alexey Samsonov [Fri, 15 Mar 2013 12:54:01 +0000 (12:54 +0000)]
[Sanitizer] Don't link tests with -lpthread on Android.

llvm-svn: 177151

11 years ago[sanitizer] fix gcc build warnings
Kostya Serebryany [Fri, 15 Mar 2013 12:27:52 +0000 (12:27 +0000)]
[sanitizer] fix gcc build warnings

llvm-svn: 177149

11 years ago[asan] Add ForEachChunk() to sanitizer allocators. Patch by Sergey Matveev
Kostya Serebryany [Fri, 15 Mar 2013 11:39:41 +0000 (11:39 +0000)]
[asan] Add ForEachChunk() to sanitizer allocators. Patch by Sergey Matveev

llvm-svn: 177147

11 years ago[Sanitizer] Generalize compile/link flags for sanitizer_common tests on Android and...
Alexey Samsonov [Fri, 15 Mar 2013 10:39:26 +0000 (10:39 +0000)]
[Sanitizer] Generalize compile/link flags for sanitizer_common tests on Android and on other platforms.

llvm-svn: 177146

11 years agoFixup for r176934. More careful setup of path to llvm-symbolizer
Alexey Samsonov [Fri, 15 Mar 2013 07:29:58 +0000 (07:29 +0000)]
Fixup for r176934. More careful setup of path to llvm-symbolizer

llvm-svn: 177145

11 years agoFixup for r176933: more careful setup of path to llvm-symbolizer
Alexey Samsonov [Fri, 15 Mar 2013 07:27:49 +0000 (07:27 +0000)]
Fixup for r176933: more careful setup of path to llvm-symbolizer

llvm-svn: 177144

11 years ago[Sanitizer] Build sanitizer_common tests w/o RTTI. Move ThreadRegistry class members...
Alexey Samsonov [Fri, 15 Mar 2013 07:08:52 +0000 (07:08 +0000)]
[Sanitizer] Build sanitizer_common tests w/o RTTI. Move ThreadRegistry class members below methods.

llvm-svn: 177143

11 years agoUse NumBaseBits in a few more places in SmallBitVector instead of recalculating it...
Craig Topper [Fri, 15 Mar 2013 06:01:42 +0000 (06:01 +0000)]
Use NumBaseBits in a few more places in SmallBitVector instead of recalculating it. No functional change.

llvm-svn: 177142

11 years agoFix the FDE encoding to be relative on ELF.
Rafael Espindola [Fri, 15 Mar 2013 05:51:57 +0000 (05:51 +0000)]
Fix the FDE encoding to be relative on ELF.

This is a very late complement to r130637 which fixed this on x86_64. Fixes
pr15448.

Since it looks like that every elf architecture uses this encoding when using
cfi, make it the default for elf. Just exclude mips64el. It has a lovely
.ll -> .o test (ef_frame.ll) that tests that nothing changes in the binary
content of the .eh_frame produced by llc. Oblige it.

llvm-svn: 177141

11 years agoAllocate the RS spill slot for any PPC function with spills and a large stack frame
Hal Finkel [Fri, 15 Mar 2013 05:06:04 +0000 (05:06 +0000)]
Allocate the RS spill slot for any PPC function with spills and a large stack frame

For spills into a large stack frame, the FI-elimination code uses the register
scavenger to obtain a free GPR for use with an r+r-addressed load or store.
When there are no available GPRs, the scavenger gets one by using its spill
slot. Previously, we were not always allocating that spill slot and the RS
would assert when the spill slot was needed.

I don't currently have a small test that triggered the assert, but I've
created a small regression test that verifies that the spill slot is now
added when the stack frame is sufficiently large.

llvm-svn: 177140

11 years agoRolled back r176719 because settings with file
Sean Callanan [Fri, 15 Mar 2013 01:39:44 +0000 (01:39 +0000)]
Rolled back r176719 because settings with file
names were broken.

<rdar://problem/13422580>

llvm-svn: 177139

11 years ago[analyzer] Refactor checks in IDC visitor for consistency and speed
Anna Zaks [Fri, 15 Mar 2013 01:15:14 +0000 (01:15 +0000)]
[analyzer] Refactor checks in IDC visitor for consistency and speed

llvm-svn: 177138

11 years ago[analyzer] Teach trackNullOrUndef to look through ternary operators
Anna Zaks [Fri, 15 Mar 2013 01:15:12 +0000 (01:15 +0000)]
[analyzer] Teach trackNullOrUndef to look through ternary operators

Allows the suppression visitors trigger more often.

llvm-svn: 177137

11 years agoTurn anonymous type in anonymous union warning back on after cleaning up
Eric Christopher [Fri, 15 Mar 2013 00:43:00 +0000 (00:43 +0000)]
Turn anonymous type in anonymous union warning back on after cleaning up
issues.

llvm-svn: 177136

11 years agoSilence anonymous type in anonymous union warnings.
Eric Christopher [Fri, 15 Mar 2013 00:42:55 +0000 (00:42 +0000)]
Silence anonymous type in anonymous union warnings.

llvm-svn: 177135

11 years agoPR15290: 'this' is not permitted in the declaration of a friend function,
Richard Smith [Fri, 15 Mar 2013 00:41:52 +0000 (00:41 +0000)]
PR15290: 'this' is not permitted in the declaration of a friend function,
therefore references to members should not be transformed into implicit uses of
'this'. Patch by Ismail Pazarbasi!

llvm-svn: 177134

11 years agoSilence anonymous type in anonymous union warnings.
Eric Christopher [Fri, 15 Mar 2013 00:32:52 +0000 (00:32 +0000)]
Silence anonymous type in anonymous union warnings.

llvm-svn: 177133

11 years agoFix a virtual destructor warning.
Eric Christopher [Fri, 15 Mar 2013 00:20:17 +0000 (00:20 +0000)]
Fix a virtual destructor warning.

Patch by Manuel Klimek!

llvm-svn: 177132

11 years agoAdd a triple to the test.
Nadav Rotem [Fri, 15 Mar 2013 00:10:23 +0000 (00:10 +0000)]
Add a triple to the test.

llvm-svn: 177131

11 years agoUnaligned loads should use the VMOVUPS opcode.
Nadav Rotem [Thu, 14 Mar 2013 23:49:44 +0000 (23:49 +0000)]
Unaligned loads should use the VMOVUPS opcode.

llvm-svn: 177130

11 years agoRemove some unused variables to clean the Clang -Werror build
David Blaikie [Thu, 14 Mar 2013 23:11:07 +0000 (23:11 +0000)]
Remove some unused variables to clean the Clang -Werror build

(these were added in r177089)

llvm-svn: 177129

11 years ago[mips] Set isAllocatable bit of unallocatable register classes to 0.
Akira Hatanaka [Thu, 14 Mar 2013 23:09:19 +0000 (23:09 +0000)]
[mips] Set isAllocatable bit of unallocatable register classes to 0.

llvm-svn: 177128

11 years agoDiagnose about extern "C" functions returning c++ objects
Fariborz Jahanian [Thu, 14 Mar 2013 23:09:00 +0000 (23:09 +0000)]
Diagnose about extern "C" functions returning c++ objects
on first declaration only. // rdar://13364028

llvm-svn: 177127

11 years agoDon't try to typo-correct 'super' in an objc method.
Argyrios Kyrtzidis [Thu, 14 Mar 2013 22:56:43 +0000 (22:56 +0000)]
Don't try to typo-correct 'super' in an objc method.

This created 2 issues:

1) Performance issue, since typo-correction with PCH/modules is rather expensive.
2) Correctness issue, since if it managed to "correct" 'super' then bogus compiler errors would
be emitted, like this:

3.m:8:3: error: unknown type name 'super'; did you mean 'super1'?
  super.x = 0;
  ^~~~~
  super1
t3.m:5:13: note: 'super1' declared here
typedef int super1;
            ^
t3.m:8:8: error: expected identifier or '('
  super.x = 0;
       ^

llvm-svn: 177126

11 years ago<rdar://problem/12537646>
Greg Clayton [Thu, 14 Mar 2013 22:52:17 +0000 (22:52 +0000)]
<rdar://problem/12537646>

lldb remembers not-found source file, setting target.source-map doesn't make it re-check for it. Now this is fixed. Each time the source path remappings get updated, the modification ID in the PathMappingList gets bumped and then we know the re-check for sources.

llvm-svn: 177125

11 years agoAdd a testcase for r177118.
Adrian Prantl [Thu, 14 Mar 2013 22:49:05 +0000 (22:49 +0000)]
Add a testcase for r177118.

llvm-svn: 177124

11 years agoFix r177112: Add ProcResGroup.
Andrew Trick [Thu, 14 Mar 2013 22:47:01 +0000 (22:47 +0000)]
Fix r177112: Add ProcResGroup.

This is the other half of r177122 that I meant to commit at the same time.

llvm-svn: 177123

11 years agoPrepare for adding InstrSchedModel annotations to X86 instructions.
Jakob Stoklund Olesen [Thu, 14 Mar 2013 22:42:17 +0000 (22:42 +0000)]
Prepare for adding InstrSchedModel annotations to X86 instructions.

The new InstrSchedModel is easier to use than the instruction
itineraries. It will be used to model instruction latency and throughput
in modern Intel microarchitectures like Sandy Bridge.

InstrSchedModel should be able to coexist with instruction itinerary
classes, but for cleanliness we should switch the Atom processor model
to the new InstrSchedModel as well.

llvm-svn: 177122

11 years ago[analyzer] Change the way in which IDC Visitor decides to kick in and make sure it...
Anna Zaks [Thu, 14 Mar 2013 22:31:56 +0000 (22:31 +0000)]
[analyzer] Change the way in which IDC Visitor decides to kick in and make sure it attaches in the given edge case

In the test case below, the value V is not constrained to 0 in ErrorNode but it is in node N.
So we used to fail to register the Suppression visitor.

We also need to change the way we determine that the Visitor should kick in because the node N belongs to
the ExplodedGraph and might not be on the BugReporter path that the visitor sees. Instead of trying to match the node,
turn on the visitor when we see the last node in which the symbol is ‘0’.

llvm-svn: 177121

11 years agoAdd a new method which enables one to change register classes.
Reed Kotler [Thu, 14 Mar 2013 22:02:09 +0000 (22:02 +0000)]
Add a new method which enables one to change register classes.
See the Mips16ISetLowering.cpp patch to see a use of this.
For now now the extra code in Mips16ISetLowering.cpp is a nop but is
used for test purposes. Mips32 registers are setup and then removed and
then the Mips16 registers are setup.

Normally you need to add register classes and then call
computeRegisterProperties.

llvm-svn: 177120

11 years agoLog the match substring as well in the case where we match the step-avoid regexp.
Jim Ingham [Thu, 14 Mar 2013 22:00:18 +0000 (22:00 +0000)]
Log the match substring as well in the case where we match the step-avoid regexp.

llvm-svn: 177119

11 years agoAlways declare the .block_descriptor parameter, not just the local copy.
Adrian Prantl [Thu, 14 Mar 2013 21:52:59 +0000 (21:52 +0000)]
Always declare the .block_descriptor parameter, not just the local copy.
Un-breaks gdb's invoke-block behavior.

llvm-svn: 177118

11 years agoAdd some logging to track cases where “step-in” steps out due to the avoid-regexp...
Jim Ingham [Thu, 14 Mar 2013 21:44:36 +0000 (21:44 +0000)]
Add some logging to track cases where “step-in” steps out due to the avoid-regexp and the step-in target.

llvm-svn: 177117

11 years agoRecommit lldb realtime output for POSIX.
Matt Kopec [Thu, 14 Mar 2013 21:35:26 +0000 (21:35 +0000)]
Recommit lldb realtime output for POSIX.
 -Adds workaround for assertion in lldb for TestEvents.py

llvm-svn: 177116

11 years agoLoopVectorizer: Insert some white space to make test case more readable
Arnold Schwaighofer [Thu, 14 Mar 2013 21:31:09 +0000 (21:31 +0000)]
LoopVectorizer: Insert some white space to make test case more readable

Also remove some unneeded function attributes.

llvm-svn: 177114

11 years ago[fast-isel] The X86FastISel::FastLowerArguments function doesn't properly handle
Chad Rosier [Thu, 14 Mar 2013 21:25:04 +0000 (21:25 +0000)]
[fast-isel] The X86FastISel::FastLowerArguments function doesn't properly handle
the win64 calling convention.
rdar://13423768

llvm-svn: 177113

11 years agoMachineModel: Add a ProcResGroup class.
Andrew Trick [Thu, 14 Mar 2013 21:21:50 +0000 (21:21 +0000)]
MachineModel: Add a ProcResGroup class.

This allows abitrary groups of processor resources. Using something in
a subset automatically counts againts the superset. Currently, this
only works if the superset is also a ProcResGroup as opposed to a
SuperUnit.

This allows SandyBridge to be expressed naturally, which will be
checked in shortly.

def SBPort01 : ProcResGroup<[SBPort0, SBPort1]>;
def SBPort15 : ProcResGroup<[SBPort1, SBPort5]>;
def SBPort23  : ProcResGroup<[SBPort2, SBPort3]>;
def SBPort015 : ProcResGroup<[SBPort0, SBPort1, SBPort5]>;

llvm-svn: 177112

11 years agoMove estimateStackSize from ARM into MachineFrameInfo
Hal Finkel [Thu, 14 Mar 2013 21:15:20 +0000 (21:15 +0000)]
Move estimateStackSize from ARM into MachineFrameInfo

This is a generic function (derived from PEI); moving it into
MachineFrameInfo eliminates a current redundancy between the ARM and AArch64
backends, and will allow it to be used by the PowerPC target code.

No functionality change intended.

llvm-svn: 177111

11 years ago[PR15513/<rdar://problem/13409707>] Template arguments in diagnostics aren't always...
Douglas Gregor [Thu, 14 Mar 2013 20:44:43 +0000 (20:44 +0000)]
[PR15513/<rdar://problem/13409707>] Template arguments in diagnostics aren't always known at compile time.

llvm-svn: 177110

11 years agoMake a README file with an introduction and basic directions for the lldb-perf infras...
Enrico Granata [Thu, 14 Mar 2013 20:42:53 +0000 (20:42 +0000)]
Make a README file with an introduction and basic directions for the lldb-perf infrastructure

llvm-svn: 177109

11 years agoProvide the register scavenger to processFunctionBeforeFrameFinalized
Hal Finkel [Thu, 14 Mar 2013 20:33:40 +0000 (20:33 +0000)]
Provide the register scavenger to processFunctionBeforeFrameFinalized

Add the current PEI register scavenger as a parameter to the
processFunctionBeforeFrameFinalized callback.

This change is necessary in order to allow the PowerPC target code to
set the register scavenger frame index after the save-area offset
adjustments performed by processFunctionBeforeFrameFinalized. Only
after these adjustments have been made is it possible to estimate
the size of the stack frame.

llvm-svn: 177108

11 years agoUse frame-index scavenging for PPC register spilling
Hal Finkel [Thu, 14 Mar 2013 20:21:47 +0000 (20:21 +0000)]
Use frame-index scavenging for PPC register spilling

Make requiresFrameIndexScavenging return true, and create virtual registers in
the spilling code instead of using the register scavenger directly. This makes
the target-level code simpler, and importantly, delays the scavenging until
after callee-saved register processing (which will be important for later
changes).

Also cleans up trackLivenessAfterRegAlloc (makes it inline in the header with
the other related functions). This makes it clear that it always returns true.

No functionality change intended.

llvm-svn: 177107

11 years agoNot all PPC functions with a frame pointer need a RS spill slot
Hal Finkel [Thu, 14 Mar 2013 19:34:32 +0000 (19:34 +0000)]
Not all PPC functions with a frame pointer need a RS spill slot

We used to add a spill slot for the register scavenger whenever the function
has a frame pointer. This is unnecessarily conservative: We may need the spill
slot for dynamic stack allocations, and functions with dynamic stack
allocations always have a FP, but we might also have a FP for other reasons
(such as the user explicitly disabling frame-pointer elimination), and we don't
necessarily need a spill slot for those functions.

The structsinregs test needed adjustment because it disables FP elimination.

llvm-svn: 177106

11 years agoARM cost model: Increase cost of some vector selects we do terrible on
Arnold Schwaighofer [Thu, 14 Mar 2013 19:17:02 +0000 (19:17 +0000)]
ARM cost model: Increase cost of some vector selects we do terrible on

By terrible I mean we store/load from the stack.

This matters on PAQp8 in _Z5trainPsS_ii (which is inlined into Mixer::update)
where we decide to vectorize a loop with a VF of 8 resulting in a 25%
degradation on a cortex-a8.

LV: Found an estimated cost of 2 for VF 8 For instruction:   icmp slt i32
LV: Found an estimated cost of 2 for VF 8 For instruction:   select i1, i32, i32

The bug that tracks the CodeGen part is PR14868.

radar://13403975

llvm-svn: 177105

11 years ago[mips] Fix filename in comment and delete unnecessary lines of code.
Akira Hatanaka [Thu, 14 Mar 2013 19:09:52 +0000 (19:09 +0000)]
[mips] Fix filename in comment and delete unnecessary lines of code.

No functionality changes.

llvm-svn: 177104

11 years agoHexagon: Removed asserts regarding alignment and offset.
Jyotsna Verma [Thu, 14 Mar 2013 19:08:03 +0000 (19:08 +0000)]
Hexagon: Removed asserts regarding alignment and offset.
We are warning the user about the alignment, so we should not assert.

llvm-svn: 177103

11 years agoAdd missing asserts flag to test - it uses debug flags
Arnold Schwaighofer [Thu, 14 Mar 2013 19:01:58 +0000 (19:01 +0000)]
Add missing asserts flag to test - it uses debug flags

llvm-svn: 177102

11 years agoAndroid uses cacheflush(long start, long end, long flags) for MIPS.
Akira Hatanaka [Thu, 14 Mar 2013 19:01:00 +0000 (19:01 +0000)]
Android uses cacheflush(long start, long end, long flags) for MIPS.

Patch by Stephen Hines.

llvm-svn: 177101

11 years ago<rdar://problem/13228487>
Enrico Granata [Thu, 14 Mar 2013 19:00:42 +0000 (19:00 +0000)]
<rdar://problem/13228487>

A test case for the performance of some LLDB formatters
Changes and improvements to the testing infrastructure itself

llvm-svn: 177100

11 years agoUpdated link to Marshall's instructions
Marshall Clow [Thu, 14 Mar 2013 19:00:34 +0000 (19:00 +0000)]
Updated link to Marshall's instructions

llvm-svn: 177099

11 years agoLoopVectorize: Invert case when we use a vector cmp value to query select cost
Arnold Schwaighofer [Thu, 14 Mar 2013 18:54:36 +0000 (18:54 +0000)]
LoopVectorize: Invert case when we use a vector cmp value to query select cost

We generate a select with a vectorized condition argument when the condition is
NOT loop invariant. Not the other way around.

llvm-svn: 177098

11 years agoAdd back lines which were accidentally deleted in CMakeLists.txt.
Akira Hatanaka [Thu, 14 Mar 2013 18:46:46 +0000 (18:46 +0000)]
Add back lines which were accidentally deleted in CMakeLists.txt.

llvm-svn: 177096

11 years ago[mips] Define function MipsSEDAGToDAGISel::selectAddESubE.
Akira Hatanaka [Thu, 14 Mar 2013 18:39:25 +0000 (18:39 +0000)]
[mips] Define function MipsSEDAGToDAGISel::selectAddESubE.

No intended functionality changes.

llvm-svn: 177095

11 years agoAdd a comment about overlapping PPC frame offsets
Hal Finkel [Thu, 14 Mar 2013 18:38:31 +0000 (18:38 +0000)]
Add a comment about overlapping PPC frame offsets

I don't think that it is otherwise clear how the overlapping offsets
are processed into distinct spill slots. Comment that this is done
in processFunctionBeforeFrameFinalized.

llvm-svn: 177094

11 years agoSome forward-looking and optimistic documentation.
Howard Hinnant [Thu, 14 Mar 2013 18:37:48 +0000 (18:37 +0000)]
Some forward-looking and optimistic documentation.

llvm-svn: 177093

11 years ago[mips] Rename functions and variables to start with proper case.
Akira Hatanaka [Thu, 14 Mar 2013 18:33:23 +0000 (18:33 +0000)]
[mips] Rename functions and variables to start with proper case.

llvm-svn: 177092

11 years ago<rdar://problem/13421412>
Greg Clayton [Thu, 14 Mar 2013 18:31:44 +0000 (18:31 +0000)]
<rdar://problem/13421412>

Many "byte size" members and variables were using a mixture of uint32_t and size_t. Switching over to using uint64_t everywhere.

llvm-svn: 177091

11 years agoAdd header file MipsISelDAGToDAG.h.
Akira Hatanaka [Thu, 14 Mar 2013 18:28:19 +0000 (18:28 +0000)]
Add header file MipsISelDAGToDAG.h.

llvm-svn: 177090

11 years ago[mips] Define two subclasses of MipsDAGToDAGISel. Mips16DAGToDAGISel is for
Akira Hatanaka [Thu, 14 Mar 2013 18:27:31 +0000 (18:27 +0000)]
[mips] Define two subclasses of MipsDAGToDAGISel. Mips16DAGToDAGISel is for
mips16 and MipsSEDAGToDAGISel is for mips32/64.

No functionality changes.

llvm-svn: 177089

11 years agoPerform factorization as a last resort of unsafe fadd/fsub simplification.
Shuxin Yang [Thu, 14 Mar 2013 18:08:26 +0000 (18:08 +0000)]
Perform factorization as a last resort of unsafe fadd/fsub simplification.

Rules include:
  1)1 x*y +/- x*z => x*(y +/- z)
    (the order of operands dosen't matter)

  2) y/x +/- z/x => (y +/- z)/x

 The transformation is disabled if the new add/sub expr "y +/- z" is a
denormal/naz/inifinity.

rdar://12911472

llvm-svn: 177088

11 years agoTest that we emit a DW_AT_location for self captured by a block.
Adrian Prantl [Thu, 14 Mar 2013 17:54:13 +0000 (17:54 +0000)]
Test that we emit a DW_AT_location for self captured by a block.
This is the backend part of a CFE test with the same name.

llvm-svn: 177087

11 years agoAllocate stack storage for .block_descriptor and captured self at -O0.
Adrian Prantl [Thu, 14 Mar 2013 17:53:33 +0000 (17:53 +0000)]
Allocate stack storage for .block_descriptor and captured self at -O0.
This way the register allocator will not optimize away the debug info
for captured variables.

Fixes rdar://problem/12767564

llvm-svn: 177086

11 years agoFixed a problem where we didn't return TypedefNameDecls
Sean Callanan [Thu, 14 Mar 2013 17:21:53 +0000 (17:21 +0000)]
Fixed a problem where we didn't return TypedefNameDecls
when clang asked for them by name.

llvm-svn: 177085

11 years ago[analyzer] Fix scan-build's -stats mode.
Jordan Rose [Thu, 14 Mar 2013 17:18:30 +0000 (17:18 +0000)]
[analyzer] Fix scan-build's -stats mode.

We were failing to match the output line, which led to us collecting no
stats at all, which led to a divide-by-zero error.

Fixes PR15510.

llvm-svn: 177084

11 years agoAdding a new code owners file for clang-tools-extra.
Edwin Vane [Thu, 14 Mar 2013 16:56:31 +0000 (16:56 +0000)]
Adding a new code owners file for clang-tools-extra.

Populated file with known existing owners.

llvm-svn: 177083

11 years ago<rdar://problem/13413693>
Greg Clayton [Thu, 14 Mar 2013 16:47:56 +0000 (16:47 +0000)]
<rdar://problem/13413693>

Fixed a crasher in the new DWARF in .o files line table linking function where "back()" could end up being called on an empty std::vector.

llvm-svn: 177082

11 years agoImplements memoization for ancestor matching.
Manuel Klimek [Thu, 14 Mar 2013 16:33:21 +0000 (16:33 +0000)]
Implements memoization for ancestor matching.

This yields a log(#ast_nodes) worst-case improvement with matchers like
stmt(unless(hasAncestor(...))).

Also made the order of visitation for ancestor matches BFS, as the most
common use cases (for example finding the closest enclosing function
definition) rely on that.

llvm-svn: 177081

11 years agoMulti-line comment alignment
Alexander Kornienko [Thu, 14 Mar 2013 16:10:54 +0000 (16:10 +0000)]
Multi-line comment alignment

Summary:
Aligns continuation lines of multi-line comments to the base
indentation level +1:
class A {
  /*
   * test
   */
  void f() {}
};

The first revision is work in progress. The implementation is not yet complete.

Reviewers: djasper

Reviewed By: djasper

CC: cfe-commits, klimek
Differential Revision: http://llvm-reviews.chandlerc.com/D541

llvm-svn: 177080

11 years ago[lld] remove trailing whitespace
Shankar Easwaran [Thu, 14 Mar 2013 16:09:49 +0000 (16:09 +0000)]
[lld] remove trailing whitespace

llvm-svn: 177079

11 years agoR600: Factorize code handling Const Read Port limitation
Vincent Lejeune [Thu, 14 Mar 2013 15:50:45 +0000 (15:50 +0000)]
R600: Factorize code handling Const Read Port limitation

llvm-svn: 177078

11 years ago[Sanitizer] Fix compiler warnings and style issues in sanitizer_common tests. Use...
Alexey Samsonov [Thu, 14 Mar 2013 15:15:35 +0000 (15:15 +0000)]
[Sanitizer] Fix compiler warnings and style issues in sanitizer_common tests. Use -Werror=sign-compare when building them.

llvm-svn: 177077

11 years agoBackout POSIX realtime lldb output. TestEvents.py is causing lldb to assert.
Matt Kopec [Thu, 14 Mar 2013 14:22:40 +0000 (14:22 +0000)]
Backout POSIX realtime lldb output. TestEvents.py is causing lldb to assert.

llvm-svn: 177076

11 years agoSlightly improve formatting of longer pipe statements.
Daniel Jasper [Thu, 14 Mar 2013 14:00:17 +0000 (14:00 +0000)]
Slightly improve formatting of longer pipe statements.

The stronger binding of a string ending in :/= does not really make
sense if it is the only character.

Before:
llvm::outs() << aaaaaaaaaaaaaaaaaaaaaaaa
             << "=" << bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb;

After:
llvm::outs() << aaaaaaaaaaaaaaaaaaaaaaaa << "="
             << bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb;

llvm-svn: 177075

11 years ago[Sanitizer] Add generic ThreadRegistry class for sanitizer runtimes. This class holds...
Alexey Samsonov [Thu, 14 Mar 2013 13:54:30 +0000 (13:54 +0000)]
[Sanitizer] Add generic ThreadRegistry class for sanitizer runtimes. This class holds basic thread bookkeeping logic and allows specific sanitizer runtimes to create thread contexts and mark threads as created/running/joined etc. The class is based on the way we currently store thread contexts in TSan.

llvm-svn: 177074

11 years agoBasic support for formatting asm() statments.
Daniel Jasper [Thu, 14 Mar 2013 13:45:21 +0000 (13:45 +0000)]
Basic support for formatting asm() statments.

llvm-svn: 177073

11 years ago[Sanitizer] Add default constructor for BlockingMutex
Alexey Samsonov [Thu, 14 Mar 2013 13:30:56 +0000 (13:30 +0000)]
[Sanitizer] Add default constructor for BlockingMutex

llvm-svn: 177072

11 years ago[sanitizer] No dirent64 on Android.
Evgeniy Stepanov [Thu, 14 Mar 2013 13:24:03 +0000 (13:24 +0000)]
[sanitizer] No dirent64 on Android.

llvm-svn: 177071

11 years ago[Sanitizer] Build sanitizer_common with -fno-rtti
Alexey Samsonov [Thu, 14 Mar 2013 13:16:35 +0000 (13:16 +0000)]
[Sanitizer] Build sanitizer_common with -fno-rtti

llvm-svn: 177070

11 years ago[asan] remove one redundant malloc stress test, unify the usage of ASAN_LOW_MEMORY...
Kostya Serebryany [Thu, 14 Mar 2013 13:16:09 +0000 (13:16 +0000)]
[asan] remove one redundant malloc stress test, unify the usage of ASAN_LOW_MEMORY macro in tests, slightly reduce test memory usage (all to make 32-bit runs consume less RAM)

llvm-svn: 177069

11 years ago[libsanitizer] fixed a bug in ThreadLister tests where we forgot to terminate one...
Alexander Potapenko [Thu, 14 Mar 2013 13:15:14 +0000 (13:15 +0000)]
[libsanitizer] fixed a bug in ThreadLister tests where we forgot to terminate one thread

Patch by Sergey Matveev (earthdok@google.com)

llvm-svn: 177068