platform/upstream/llvm.git
11 years ago[asan] speedup by more than 2x handling of the small memset/memcpy/etc calls
Kostya Serebryany [Thu, 21 Feb 2013 07:07:39 +0000 (07:07 +0000)]
[asan] speedup by more than 2x handling of the small memset/memcpy/etc calls

llvm-svn: 175728

11 years agoMake another kill check LiveIntervals-aware.
Cameron Zwarich [Thu, 21 Feb 2013 07:02:30 +0000 (07:02 +0000)]
Make another kill check LiveIntervals-aware.

This brings the number of remaining failures in 'make check' without
LiveVariables down to 39, with 1 unexpectedly passing test.

llvm-svn: 175727

11 years agoSplit part of isKilled() into a separate function for use elsewhere.
Cameron Zwarich [Thu, 21 Feb 2013 07:02:28 +0000 (07:02 +0000)]
Split part of isKilled() into a separate function for use elsewhere.

llvm-svn: 175726

11 years agoCorrect spelling of 'enumerator'.
David Blaikie [Thu, 21 Feb 2013 06:12:38 +0000 (06:12 +0000)]
Correct spelling of 'enumerator'.

Post commit code review feedback to r175705 from Jordan Rose.

llvm-svn: 175725

11 years agoCorrect spelling of 'enumerator'.
David Blaikie [Thu, 21 Feb 2013 06:08:22 +0000 (06:08 +0000)]
Correct spelling of 'enumerator'.

Post commit code review feedback to r175705 from Jordan Rose.

llvm-svn: 175724

11 years agoMake Optional<T>'s operator bool 'explicit' in C++11
David Blaikie [Thu, 21 Feb 2013 06:05:57 +0000 (06:05 +0000)]
Make Optional<T>'s operator bool 'explicit' in C++11

Provides a general way to add 'explicit' for conversion operators (a no-op when
compiling as C++98).

llvm-svn: 175723

11 years agoAvoid implicit conversions of Optional<T> to bool.
David Blaikie [Thu, 21 Feb 2013 06:05:05 +0000 (06:05 +0000)]
Avoid implicit conversions of Optional<T> to bool.

This is a precursor to making Optional<T>'s operator bool 'explicit' when
building Clang & LLVM as C++11.

llvm-svn: 175722

11 years agoStaticAnalyzer/Core: Suppress warnings. [-Wunused-variable, -Wunused-function]
NAKAMURA Takumi [Thu, 21 Feb 2013 04:40:10 +0000 (04:40 +0000)]
StaticAnalyzer/Core: Suppress warnings. [-Wunused-variable, -Wunused-function]

llvm-svn: 175721

11 years agoWhitespace.
NAKAMURA Takumi [Thu, 21 Feb 2013 04:40:04 +0000 (04:40 +0000)]
Whitespace.

llvm-svn: 175720

11 years agoUpdate isKilledAt in TwoAddressInstructionPass.cpp to use LiveIntervals when
Cameron Zwarich [Thu, 21 Feb 2013 04:33:02 +0000 (04:33 +0000)]
Update isKilledAt in TwoAddressInstructionPass.cpp to use LiveIntervals when
available.

With this commit there are no longer any assertion or verifier failures when
running 'make check' without LiveVariables. There are still 56 failing tests
with codegen differences and 1 unexpectedly passing test.

llvm-svn: 175719

11 years agoExpand the sel pseudo/macro. This generates basic blocks where previously
Reed Kotler [Thu, 21 Feb 2013 04:22:38 +0000 (04:22 +0000)]
Expand the sel pseudo/macro. This generates basic blocks where previously
there were inline br .+4 instructions. Soon everything can enjoy the
full instruction scheduling experience.

llvm-svn: 175718

11 years agoAdd some documentation on how HandleCommand work.
Jim Ingham [Thu, 21 Feb 2013 03:17:20 +0000 (03:17 +0000)]
Add some documentation on how HandleCommand work.

llvm-svn: 175717

11 years ago[analyzer] Record whether a base object region represents a virtual base.
Jordan Rose [Thu, 21 Feb 2013 03:12:32 +0000 (03:12 +0000)]
[analyzer] Record whether a base object region represents a virtual base.

This allows MemRegion and MemRegionManager to avoid asking over and over
again whether an class is a virtual base or a non-virtual base.

Minor optimization/cleanup; no functionality change.

llvm-svn: 175716

11 years ago[analyzer] Add another reinterpret_cast behavior test.
Jordan Rose [Thu, 21 Feb 2013 03:12:26 +0000 (03:12 +0000)]
[analyzer] Add another reinterpret_cast behavior test.

The test is similar to <rdar://problem/13239840> but doesn't actually test
the case that fails there. It's still a good test, though.

llvm-svn: 175715

11 years ago[analyzer] Tidy up a few uses of Optional in RegionStore.
Jordan Rose [Thu, 21 Feb 2013 03:12:21 +0000 (03:12 +0000)]
[analyzer] Tidy up a few uses of Optional in RegionStore.

Some that I just added needed conversion to use 'None', others looked
better using Optional<SVal>::create.

No functionality change.

llvm-svn: 175714

11 years agoCIndex.cpp: Appease g++-4.4. "if (Optional<unsigned> Minor = In.getMinor())" did...
NAKAMURA Takumi [Thu, 21 Feb 2013 02:32:34 +0000 (02:32 +0000)]
CIndex.cpp: Appease g++-4.4. "if (Optional<unsigned> Minor = In.getMinor())" did not work as expected.

llvm-svn: 175711

11 years agoADT/Optional.h: Appease msvc. It reapplies r175626.
NAKAMURA Takumi [Thu, 21 Feb 2013 02:32:25 +0000 (02:32 +0000)]
ADT/Optional.h: Appease msvc. It reapplies r175626.

llvm-svn: 175710

11 years ago[objdump] Add PT_PHDR.
Michael J. Spencer [Thu, 21 Feb 2013 02:21:29 +0000 (02:21 +0000)]
[objdump] Add PT_PHDR.

llvm-svn: 175709

11 years agolibstdc++'s <cstdalign> #includes <stdalign.h> and expects it to guard against
Richard Smith [Thu, 21 Feb 2013 02:17:58 +0000 (02:17 +0000)]
libstdc++'s <cstdalign> #includes <stdalign.h> and expects it to guard against
being included in C++. Don't define alignof or alignas in this case. Note that
the C++11 standard is broken in various ways here (it refers to the contents
of <stdalign.h> in C99, where that header did not exist, and doesn't mention
the alignas macro at all), but we do our best to do what it intended.

llvm-svn: 175708

11 years agoMips specific standalone assembler addressing mode %hi and %lo.
Jack Carter [Thu, 21 Feb 2013 02:09:31 +0000 (02:09 +0000)]
Mips specific standalone assembler addressing mode %hi and %lo.

The constructs %hi() and %lo() represent the high and low 16
bits of the address.
Because the 16 bit offset field of an LW instruction is
interpreted as signed, if bit 15 of the low part is 1 then the
low part will act as a negative and 1 needs to be added to the
high part.

Contributer: Vladimir Medic
llvm-svn: 175707

11 years agoRespect -fno-canonical-prefixes when deciding where to generate .gcno and .gcda
Nick Lewycky [Thu, 21 Feb 2013 02:02:50 +0000 (02:02 +0000)]
Respect -fno-canonical-prefixes when deciding where to generate .gcno and .gcda
files.

llvm-svn: 175706

11 years agoUse None rather than Optional<T>() where possible.
David Blaikie [Thu, 21 Feb 2013 01:47:18 +0000 (01:47 +0000)]
Use None rather than Optional<T>() where possible.

llvm-svn: 175705

11 years agoRename TypeLoc's isType to isKind
David Blaikie [Thu, 21 Feb 2013 01:47:08 +0000 (01:47 +0000)]
Rename TypeLoc's isType to isKind

Matches changes made to SVal's similar functions based on Jordan Rose's review
feedback to r175594.

Also change isKind to take a reference rather than a non-null pointer, while I'm
at it. (& make TypeLoc::isKind private)

llvm-svn: 175704

11 years ago[analyzer] Tighten up safety in the use of lazy bindings.
Jordan Rose [Thu, 21 Feb 2013 01:34:51 +0000 (01:34 +0000)]
[analyzer] Tighten up safety in the use of lazy bindings.

- When deciding if we can reuse a lazy binding, make sure to check if there
  are additional bindings in the sub-region.
- When reading from a lazy binding, don't accidentally strip off casts or
  base object regions. This slows down lazy binding reading a bit but is
  necessary for type sanity when treating one class as another.

A bit of minor refactoring allowed these two checks to be unified in a nice
early-return-using helper function.

<rdar://problem/13239840>

llvm-svn: 175703

11 years agoIf you say
Enrico Granata [Thu, 21 Feb 2013 01:29:04 +0000 (01:29 +0000)]
If you say
(lldb) frame variable
without first launching the inferior, you get:
error: invalid frame

this is misleading and should probably hint that there is no process. Adding this flag makes sure that we get:
error: invalid process

The difference between eFlagRequiresProcess and eFlagProcessMustBeLaunched is an open question.

llvm-svn: 175702

11 years agoStrip 'llvm' from 'llvm::Optional' uses.
Ted Kremenek [Thu, 21 Feb 2013 01:29:01 +0000 (01:29 +0000)]
Strip 'llvm' from 'llvm::Optional' uses.

llvm-svn: 175701

11 years agoFixed a bug where certain vector code didn't
Sean Callanan [Thu, 21 Feb 2013 01:04:23 +0000 (01:04 +0000)]
Fixed a bug where certain vector code didn't
work on i386.  Now we let the JIT emit SSE/SSE2
instructions on i386.

<rdar://problem/13240476>

llvm-svn: 175700

11 years agoRemove commented out code.
Richard Trieu [Thu, 21 Feb 2013 00:50:43 +0000 (00:50 +0000)]
Remove commented out code.

llvm-svn: 175699

11 years agoobjective-C arc IR-gen. Retaining of strong
Fariborz Jahanian [Thu, 21 Feb 2013 00:40:10 +0000 (00:40 +0000)]
objective-C arc IR-gen. Retaining of strong
arguments in function prologue is done
with objc_StoreStrong to pair it with
similar objc_StoreStrong for release in function
epilogue. This is done with -O0 only.
// rdar://13145317

llvm-svn: 175698

11 years agoPPCDAGToDAGISel::PostprocessISelDAG()
Bill Schmidt [Thu, 21 Feb 2013 00:38:25 +0000 (00:38 +0000)]
PPCDAGToDAGISel::PostprocessISelDAG()

This patch implements the PPCDAGToDAGISel::PostprocessISelDAG virtual
method to perform post-selection peephole optimizations on the DAG
representation.

One optimization is implemented here:  folds to clean up complex
addressing expressions for thread-local storage and medium code
model.  It will also be useful for large code model sequences when
those are added later.  I originally thought about doing this on the
MI representation prior to register assignment, but it's difficult to
do effective global dead code elimination at that point.  DCE is
trivial on the DAG representation.

A typical example of a candidate code sequence in assembly:

   addis 3, 2, globalvar@toc@ha
   addi  3, 3, globalvar@toc@l
   lwz   5, 0(3)

When the final instruction is a load or store with an immediate offset
of zero, the offset from the add-immediate can replace the zero,
provided the relocation information is carried along:

   addis 3, 2, globalvar@toc@ha
   lwz   5, globalvar@toc@l(3)

Since the addi can in general have multiple uses, we need to only
delete the instruction when the last use is removed.

llvm-svn: 175697

11 years agoProvide a "None" value for convenience when using Optional<T>()
David Blaikie [Thu, 21 Feb 2013 00:27:28 +0000 (00:27 +0000)]
Provide a "None" value for convenience when using Optional<T>()

This implementation of NoneType/None does have some holes but I haven't
found one that doesn't - open to improvement.

llvm-svn: 175696

11 years agoMark unimplemented function with LLVM_DELETED_FUNCTION
David Blaikie [Thu, 21 Feb 2013 00:26:17 +0000 (00:26 +0000)]
Mark unimplemented function with LLVM_DELETED_FUNCTION

llvm-svn: 175695

11 years agoDoxycomment SVal's getAs/castAs.
David Blaikie [Thu, 21 Feb 2013 00:26:14 +0000 (00:26 +0000)]
Doxycomment SVal's getAs/castAs.

Also document TypeLoc's operations similarly, since it's a good idea.

Post-commit CR feedback from Anna Zaks regarding r175594.

llvm-svn: 175694

11 years agoRelocation enablement for PPC DAG postprocessing pass
Bill Schmidt [Thu, 21 Feb 2013 00:05:29 +0000 (00:05 +0000)]
Relocation enablement for PPC DAG postprocessing pass

llvm-svn: 175693

11 years agoFormatting.
Chad Rosier [Wed, 20 Feb 2013 23:57:30 +0000 (23:57 +0000)]
Formatting.

llvm-svn: 175692

11 years ago*ahem* Enrico.
Jason Molenda [Wed, 20 Feb 2013 23:51:13 +0000 (23:51 +0000)]
*ahem* Enrico.

llvm-svn: 175691

11 years agoDon't allocate memory in LiveInterval::join().
Jakob Stoklund Olesen [Wed, 20 Feb 2013 23:51:10 +0000 (23:51 +0000)]
Don't allocate memory in LiveInterval::join().

Rewrite value numbers directly in the 'Other' LiveInterval which is
moribund anyway. This avoids allocating the OtherAssignments vector.

llvm-svn: 175690

11 years agoMention "return" -> "thread return"
Jim Ingham [Wed, 20 Feb 2013 23:38:37 +0000 (23:38 +0000)]
Mention "return" -> "thread return"

llvm-svn: 175689

11 years agoKill of TransferDeadFlag - Dead copies and subreg-to-reg instructions should
Lang Hames [Wed, 20 Feb 2013 23:36:57 +0000 (23:36 +0000)]
Kill of TransferDeadFlag - Dead copies and subreg-to-reg instructions should
just be turned into kills on the spot.

llvm-svn: 175688

11 years agoas the allocator is reset zero out the number of bytes allocated, this was just
Pedro Artigas [Wed, 20 Feb 2013 23:30:56 +0000 (23:30 +0000)]
as the allocator is reset zero out the number of bytes allocated, this was just
missed before but probably what was intended.

llvm-svn: 175687

11 years agoELF symbol table field st_other support,
Jack Carter [Wed, 20 Feb 2013 23:11:17 +0000 (23:11 +0000)]
ELF symbol table field st_other support,
excluding visibility bits.

Mips specific standalone assembler directive "set at".

This directive changes the general purpose register
that the assembler will use when given the symbolic
register name $at.

This does not include negative testing. That will come
in a future patch.

A side affect of this patch recognizes the different
GPR register names for temporaries between old abi
and new abi so a test case for that is included.

Contributer: Vladimir Medic
llvm-svn: 175686

11 years agoCopy single reaching defs directly into the LiveInterval.
Jakob Stoklund Olesen [Wed, 20 Feb 2013 23:08:26 +0000 (23:08 +0000)]
Copy single reaching defs directly into the LiveInterval.

When findReachingDefs() finds that only one value can reach the basic
block, just copy the work list of visited blocks directly into the live
interval.

Sort the block list and use a LiveRangeUpdater to make the bulk add
fast.

When multiple reaching defs are found, transfer the work list to the
updateSSA() work list as before. Also use LiveRangeUpdater in
updateLiveIns() following updateSSA().

This makes live interval analysis more than 3x faster on one huge test
case.

llvm-svn: 175685

11 years agoAdd and remove the attribute from the correct slot.
Bill Wendling [Wed, 20 Feb 2013 23:04:11 +0000 (23:04 +0000)]
Add and remove the attribute from the correct slot.

The slot that we're adding/removing the attribute from may not be the same as
the attribute coming in. Make sure that they match up before we try to
add/remove them.
PR15313

llvm-svn: 175684

11 years agoStabilize vec_constants.ll
Bill Schmidt [Wed, 20 Feb 2013 22:43:03 +0000 (22:43 +0000)]
Stabilize vec_constants.ll

llvm-svn: 175683

11 years agoFix accidental concatenation for "outputuntil" in the -debug-buffer-size option descr...
Erik Verbruggen [Wed, 20 Feb 2013 22:33:46 +0000 (22:33 +0000)]
Fix accidental concatenation for "outputuntil" in the -debug-buffer-size option description.

llvm-svn: 175682

11 years agoRevert "intmax_t is long long on Darwin, not long."
Jordan Rose [Wed, 20 Feb 2013 22:28:41 +0000 (22:28 +0000)]
Revert "intmax_t is long long on Darwin, not long."

'long' and 'long long' are different for the purposes of mangling.
This caused <rdar://problem/13254874>.

This reverts commit c2f994d31ec85e9af811af38eb1b28709aef0b2c.

llvm-svn: 175681

11 years agoMCParser: Update method names per coding guidelines.
Jim Grosbach [Wed, 20 Feb 2013 22:25:15 +0000 (22:25 +0000)]
MCParser: Update method names per coding guidelines.

s/ParseMSInlineAsm/parseMSInlineAsm/

llvm-svn: 175680

11 years agoInclude llvm::Optional in clang/Basic/LLVM.h
David Blaikie [Wed, 20 Feb 2013 22:23:23 +0000 (22:23 +0000)]
Include llvm::Optional in clang/Basic/LLVM.h

Post-commit CR feedback from Jordan Rose regarding r175594.

llvm-svn: 175679

11 years agoRemove redundant Optional type in favor of llvm::Optional
David Blaikie [Wed, 20 Feb 2013 22:23:03 +0000 (22:23 +0000)]
Remove redundant Optional type in favor of llvm::Optional

llvm-svn: 175678

11 years agoUse op-> directly rather than via Optional<T>::getPointer.
David Blaikie [Wed, 20 Feb 2013 22:23:01 +0000 (22:23 +0000)]
Use op-> directly rather than via Optional<T>::getPointer.

Post-commit CR feedback from Jordan Rose regarding r175594.

llvm-svn: 175677

11 years agoRename SVal::isType functions to SVal::isKind
David Blaikie [Wed, 20 Feb 2013 22:22:59 +0000 (22:22 +0000)]
Rename SVal::isType functions to SVal::isKind

Post-commit CR feedback from Jordan Rose regarding r175594.

llvm-svn: 175676

11 years agoMCParser: Update method names per coding guidelines.
Jim Grosbach [Wed, 20 Feb 2013 22:21:35 +0000 (22:21 +0000)]
MCParser: Update method names per coding guidelines.

s/AddDirectiveHandler/addDirectiveHandler/
s/ParseMSInlineAsm/parseMSInlineAsm/
s/ParseIdentifier/parseIdentifier/
s/ParseStringToEndOfStatement/parseStringToEndOfStatement/
s/ParseEscapedString/parseEscapedString/
s/EatToEndOfStatement/eatToEndOfStatement/
s/ParseExpression/parseExpression/
s/ParseParenExpression/parseParenExpression/
s/ParseAbsoluteExpression/parseAbsoluteExpression/
s/CheckForValidSection/checkForValidSection/

http://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly

No functional change intended.

llvm-svn: 175675

11 years agoOnly use LiveIntervals in TwoAddressInstructionPass, not a mix of Liveintervals
Cameron Zwarich [Wed, 20 Feb 2013 22:10:02 +0000 (22:10 +0000)]
Only use LiveIntervals in TwoAddressInstructionPass, not a mix of Liveintervals
and SlotIndexes.

llvm-svn: 175674

11 years agoFind anchoring end points for repairIntervalsInRange and repairIndexesInRange
Cameron Zwarich [Wed, 20 Feb 2013 22:10:00 +0000 (22:10 +0000)]
Find anchoring end points for repairIntervalsInRange and repairIndexesInRange
automatically.

llvm-svn: 175673

11 years agoMake repairIntervalsInRange() more robust. There are now no longer any liveness-
Cameron Zwarich [Wed, 20 Feb 2013 22:09:57 +0000 (22:09 +0000)]
Make repairIntervalsInRange() more robust. There are now no longer any liveness-
related failures when running 'make check' without LiveVariables with the
verifier enabled. Some of the remaining failures elsewhere may still be fallout
from incorrect updating of LiveIntervals or the few missing cases left in the
two-address pass.

llvm-svn: 175672

11 years agoChange ELF relocation model to static
Andrew Kaylor [Wed, 20 Feb 2013 21:39:02 +0000 (21:39 +0000)]
Change ELF relocation model to static

llvm-svn: 175671

11 years agoDAGCombiner: Fold pointless truncate, bitcast, buildvector series
Arnold Schwaighofer [Wed, 20 Feb 2013 21:33:32 +0000 (21:33 +0000)]
DAGCombiner: Fold pointless truncate, bitcast, buildvector series

(2xi32) (truncate ((2xi64) bitcast (buildvector i32 a, i32 x, i32 b, i32 y)))
can be folded into a (2xi32) (buildvector i32 a, i32 b).

Such a DAG would cause uneccessary vdup instructions followed by vmovn
instructions.

We generate this code on ARM NEON for a setcc olt, 2xf64, 2xf64. For example, in
the vectorized version of the code below.

double A[N];
double B[N];

void test_double_compare_to_double() {
  int i;
  for(i=0;i<N;i++)
    A[i] = (double)(A[i] < B[i]);
}

radar://13191881

Fixes bug 15283.

llvm-svn: 175670

11 years agoAdd logging of which test cases are run (through dosep) to help diagnose any hangs...
Daniel Malea [Wed, 20 Feb 2013 21:31:47 +0000 (21:31 +0000)]
Add logging of which test cases are run (through dosep) to help diagnose any hangs/crashes in the buildbots.

llvm-svn: 175669

11 years agoR600: Update for name changes from r175667.
Jim Grosbach [Wed, 20 Feb 2013 21:31:28 +0000 (21:31 +0000)]
R600: Update for name changes from r175667.

llvm-svn: 175668

11 years agoUpdate TargetLowering ivars for name policy.
Jim Grosbach [Wed, 20 Feb 2013 21:13:59 +0000 (21:13 +0000)]
Update TargetLowering ivars for name policy.

http://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly

ivars should be camel-case and start with an upper-case letter. A few in
TargetLowering were starting with a lower-case letter.

No functional change intended.

llvm-svn: 175667

11 years agoFix invalid TestBitfields case (thanks Filipe!), and xfail one case due to GCC compil...
Daniel Malea [Wed, 20 Feb 2013 21:11:20 +0000 (21:11 +0000)]
Fix invalid TestBitfields case (thanks Filipe!), and xfail one case due to GCC compiler bug.

Turns out unnamed bit fields should not be accessed ever in C (C99 section 4.7.8) or C++
(C++11 section 9.6).

Unrelated to the above, this commit marks TestBitfields as expected-to-fail with GCC as 4.7
has problems with padding... the size of the struct with a uint32_t member is reported as 12
when GCC is used. Clang emits correct code.

Parts of this patch prepared by Filipe Cabecinhas!

llvm-svn: 175666

11 years agoSkip TestCompletion case that fails on linux (with gcc) because the input prompt...
Daniel Malea [Wed, 20 Feb 2013 20:58:20 +0000 (20:58 +0000)]
Skip TestCompletion case that fails on linux (with gcc) because the input prompt is not displayed (llvm.org/pr14637)

llvm-svn: 175665

11 years agoFix TestPublicAPIHeaders test on Linux.
Matt Kopec [Wed, 20 Feb 2013 20:54:10 +0000 (20:54 +0000)]
Fix TestPublicAPIHeaders test on Linux.
 -Change the build_dir variable name to lib_dir
 -Set lib_dir to the correct location on Linux
 -Set LD_EXTRAS to the actual lldb library

llvm-svn: 175664

11 years agoAdditional fixes for bug 15155.
Bill Schmidt [Wed, 20 Feb 2013 20:41:42 +0000 (20:41 +0000)]
Additional fixes for bug 15155.

This handles the cases where the 6-bit splat element is odd, converting
to a three-instruction sequence to add or subtract two splats.  With this
fix, the XFAIL in test/CodeGen/PowerPC/vec_constants.ll is removed.

llvm-svn: 175663

11 years agoHandle the case where the runtime uses class_getMethodImplementation for both scalar...
Jim Ingham [Wed, 20 Feb 2013 20:35:38 +0000 (20:35 +0000)]
Handle the case where the runtime uses class_getMethodImplementation for both scalar and structure
return methods.

rdar://problem/13238168

llvm-svn: 175662

11 years ago[Sanitizer] Try to fix infinite loop in frame pointer unwinder
Reid Kleckner [Wed, 20 Feb 2013 20:29:48 +0000 (20:29 +0000)]
[Sanitizer] Try to fix infinite loop in frame pointer unwinder

Using > instead of >= ensures that each frame deref makes progress and
that we eventually terminate.

Issue: https://code.google.com/p/address-sanitizer/issues/detail?id=162
llvm-svn: 175661

11 years agoPR15311: Finish implementation of the suggested resolution of core issue 1488,
Richard Smith [Wed, 20 Feb 2013 20:19:27 +0000 (20:19 +0000)]
PR15311: Finish implementation of the suggested resolution of core issue 1488,
which allows grouping parens in an abstract-pack-declarator. This was already
mostly implemented, but missed some cases. Add an ExtWarn for use of this
extension until CWG ratifies it.

llvm-svn: 175660

11 years ago[objdump] Print the PT_INTERP and PT_DYNAMIC correcctly.
Michael J. Spencer [Wed, 20 Feb 2013 20:18:10 +0000 (20:18 +0000)]
[objdump] Print the PT_INTERP and PT_DYNAMIC correcctly.

llvm-svn: 175659

11 years agoUpdate a comment that looks to have been accidentally deleted many moons ago.
Chad Rosier [Wed, 20 Feb 2013 20:15:55 +0000 (20:15 +0000)]
Update a comment that looks to have been accidentally deleted many moons ago.

llvm-svn: 175658

11 years ago[ELF][Writer] Add .interp section.
Michael J. Spencer [Wed, 20 Feb 2013 20:13:47 +0000 (20:13 +0000)]
[ELF][Writer] Add .interp section.

llvm-svn: 175657

11 years agoFix a bug that causes dotest.py to exit with a passing exit-code, even if some tests...
Daniel Malea [Wed, 20 Feb 2013 20:12:11 +0000 (20:12 +0000)]
Fix a bug that causes dotest.py to exit with a passing exit-code, even if some tests fail
- occurs when multiple compilers/architectures are tested (via -C or -A flags)

llvm-svn: 175656

11 years ago[ASan] revert part of r175631 that looks like accidental commit
Alexey Samsonov [Wed, 20 Feb 2013 19:55:47 +0000 (19:55 +0000)]
[ASan] revert part of r175631 that looks like accidental commit

llvm-svn: 175655

11 years ago[ELF][Writer] Add dynamic table.
Michael J. Spencer [Wed, 20 Feb 2013 19:46:12 +0000 (19:46 +0000)]
[ELF][Writer] Add dynamic table.

llvm-svn: 175654

11 years agoFix a problem with the const_variables test case (another lldb bug remains)
Daniel Malea [Wed, 20 Feb 2013 19:41:49 +0000 (19:41 +0000)]
Fix a problem with the const_variables test case (another lldb bug remains)
- make the test case step past the location where 'index' is initialized, otherwise its value cannot be printed (verified gcc 4.6/4.7 and recent clang)
- "Couldn't materialize struct" error from LLDB still prevents this test case from passing

llvm-svn: 175653

11 years agoAttempt to clean up tests for non-X86 platforms.
Bill Wendling [Wed, 20 Feb 2013 19:30:01 +0000 (19:30 +0000)]
Attempt to clean up tests for non-X86 platforms.

llvm-svn: 175652

11 years agoRewrite comments.
Dan Gohman [Wed, 20 Feb 2013 19:28:46 +0000 (19:28 +0000)]
Rewrite comments.

llvm-svn: 175651

11 years agoAdd comment in Memory.inc explaining r175646.
Krzysztof Parzyszek [Wed, 20 Feb 2013 19:25:09 +0000 (19:25 +0000)]
Add comment in Memory.inc explaining r175646.

llvm-svn: 175650

11 years agoProcess and handle attributes on conditions and for loop variables. Process and
Richard Smith [Wed, 20 Feb 2013 19:22:51 +0000 (19:22 +0000)]
Process and handle attributes on conditions and for loop variables. Process and
diagnose attributes on alias declarations, using directives, and attribute
declarations.

llvm-svn: 175649

11 years agoSIGQUIT is a "kill" signal, rather than an "int" signal, in this context.
Dan Gohman [Wed, 20 Feb 2013 19:15:01 +0000 (19:15 +0000)]
SIGQUIT is a "kill" signal, rather than an "int" signal, in this context.

llvm-svn: 175648

11 years agoFormatting, grammar
Andrew Kaylor [Wed, 20 Feb 2013 18:24:34 +0000 (18:24 +0000)]
Formatting, grammar

llvm-svn: 175647

11 years agoOn PowerPC, the cache-flush instructions dcbf and icbi are treated as
Krzysztof Parzyszek [Wed, 20 Feb 2013 18:24:30 +0000 (18:24 +0000)]
On PowerPC, the cache-flush instructions dcbf and icbi are treated as
loads. On FreeBSD, add PROT_READ page protection flag before flushing
cache.

llvm-svn: 175646

11 years agoUse LiveRangeUpdater instead of mergeIntervalRanges.
Jakob Stoklund Olesen [Wed, 20 Feb 2013 18:18:15 +0000 (18:18 +0000)]
Use LiveRangeUpdater instead of mergeIntervalRanges.

Performance is the same, but LiveRangeUpdater has a more flexible
interface.

llvm-svn: 175645

11 years agoAdd a LiveRangeUpdater class.
Jakob Stoklund Olesen [Wed, 20 Feb 2013 18:18:12 +0000 (18:18 +0000)]
Add a LiveRangeUpdater class.

Adding new segments to large LiveIntervals can be expensive because the
LiveRange objects after the insertion point may need to be moved left or
right. This can cause quadratic behavior when adding a large number of
segments to a live range.

The LiveRangeUpdater class allows the LIveInterval to be in a temporary
invalid state while segments are being added. It maintains an internal
gap in the LiveInterval when it is shrinking, and it has a spill area
for new segments when the LiveInterval is growing.

The behavior is similar to the existing mergeIntervalRanges() function,
except it allocates less memory for the spill area, and the algorithm is
turned inside out so the loop is driven by the clients.

llvm-svn: 175644

11 years agoAdding support for absolute relocations. This occurs in ELF files when a relocation...
Andrew Kaylor [Wed, 20 Feb 2013 18:09:21 +0000 (18:09 +0000)]
Adding support for absolute relocations.  This occurs in ELF files when a relocation is given with no name and an undefined section.  The relocation is applied with an address of zero.

llvm-svn: 175643

11 years agoFix PR15267
Michael Liao [Wed, 20 Feb 2013 18:04:21 +0000 (18:04 +0000)]
Fix PR15267

- When extloading from a vector with non-byte-addressable element, e.g.
  <4 x i1>, the current logic breaks. Extend the current logic to
  fix the case where the element type is not byte-addressable by loading
  all bytes, bit-extracting/packing each element.

llvm-svn: 175642

11 years ago[ms-inline asm] Make the comment a bit more verbose.
Chad Rosier [Wed, 20 Feb 2013 18:03:44 +0000 (18:03 +0000)]
[ms-inline asm] Make the comment a bit more verbose.

llvm-svn: 175641

11 years agoAdd a default constructor for LiveRange.
Jakob Stoklund Olesen [Wed, 20 Feb 2013 17:46:51 +0000 (17:46 +0000)]
Add a default constructor for LiveRange.

It is useful to be able to create temporary LiveRange object whose
members are filled in later.

llvm-svn: 175639

11 years agorename fixupAddend to relocAddend
Shankar Easwaran [Wed, 20 Feb 2013 17:42:00 +0000 (17:42 +0000)]
rename fixupAddend to relocAddend

llvm-svn: 175638

11 years ago[ms-inline asm] Remove this test while I investigate why eax isn't being clobbered.
Chad Rosier [Wed, 20 Feb 2013 17:39:31 +0000 (17:39 +0000)]
[ms-inline asm] Remove this test while I investigate why eax isn't being clobbered.

llvm-svn: 175637

11 years agofunctionality to handle global atoms in Merge sections
Shankar Easwaran [Wed, 20 Feb 2013 17:38:37 +0000 (17:38 +0000)]
functionality to handle global atoms in Merge sections

llvm-svn: 175636

11 years agoFix bug 14779 for passing anonymous aggregates [patch by Kai Nacke].
Bill Schmidt [Wed, 20 Feb 2013 17:31:41 +0000 (17:31 +0000)]
Fix bug 14779 for passing anonymous aggregates [patch by Kai Nacke].

The PPC backend doesn't handle these correctly.  This patch uses logic
similar to that in the X86 and ARM backends to track these arguments
properly.

llvm-svn: 175635

11 years agoHexagon: Move HexagonMCInst.h to MCTargetDesc/HexagonMCInst.h.
Jyotsna Verma [Wed, 20 Feb 2013 16:13:27 +0000 (16:13 +0000)]
Hexagon: Move HexagonMCInst.h to MCTargetDesc/HexagonMCInst.h.
Add HexagonMCInst class which adds various Hexagon VLIW annotations.
In addition, this class also includes some APIs related to the
constant extenders.

llvm-svn: 175634

11 years agoRevert r175626, "ADT/Optional.h: Appease msvc."
NAKAMURA Takumi [Wed, 20 Feb 2013 15:52:44 +0000 (15:52 +0000)]
Revert r175626, "ADT/Optional.h: Appease msvc."

Sorry, I didn't cover +Asserts, by accident. :(

llvm-svn: 175633

11 years agoFix PR15155: lost vadd/vsplat optimization.
Bill Schmidt [Wed, 20 Feb 2013 15:50:31 +0000 (15:50 +0000)]
Fix PR15155: lost vadd/vsplat optimization.

During lowering of a BUILD_VECTOR, we look for opportunities to use a
vector splat.  When the splatted value fits in 5 signed bits, a single
splat does the job.  When it doesn't fit in 5 bits but does fit in 6,
and is an even value, we can splat on half the value and add the result
to itself.

This last optimization hasn't been working recently because of improved
constant folding.  To circumvent this, create a pseudo VADD_SPLAT that
can be expanded during instruction selection.

llvm-svn: 175632

11 years ago[ASan] Delete asan/dynamic dir and temporarily move the interposers declarations...
Alexander Potapenko [Wed, 20 Feb 2013 15:46:02 +0000 (15:46 +0000)]
[ASan] Delete asan/dynamic dir and temporarily move the interposers declarations to asan_intercepted_functions.h
Now that we have only one dependency on asan_intercepted_functions.h, we can unite that code with the interceptors declarations in asan_interceptors.cc and get rid of asan_intercepted_functions.h

llvm-svn: 175631

11 years agoFix regression in string literal alignment.
Manuel Klimek [Wed, 20 Feb 2013 15:32:58 +0000 (15:32 +0000)]
Fix regression in string literal alignment.

Now correctly indents (again):
a = a + "a"
        "a"
        "a";

llvm-svn: 175630

11 years ago[ASan] Make isoc99_*scanf intercepted on Linux only. Those are unavailable on Darwin.
Alexander Potapenko [Wed, 20 Feb 2013 15:27:58 +0000 (15:27 +0000)]
[ASan] Make isoc99_*scanf intercepted on Linux only. Those are unavailable on Darwin.

llvm-svn: 175629

11 years agoFixes bug in string literal alignment.
Manuel Klimek [Wed, 20 Feb 2013 15:25:48 +0000 (15:25 +0000)]
Fixes bug in string literal alignment.

We now indent the following correctly:
1. some + "literal" /* comment */
          "literal";
2. breaking string literals after which we have another string literal.

llvm-svn: 175628

11 years agoWhitespace.
NAKAMURA Takumi [Wed, 20 Feb 2013 15:12:32 +0000 (15:12 +0000)]
Whitespace.

llvm-svn: 175627

11 years agoADT/Optional.h: Appease msvc.
NAKAMURA Takumi [Wed, 20 Feb 2013 15:12:24 +0000 (15:12 +0000)]
ADT/Optional.h: Appease msvc.

llvm-svn: 175626