Commit Graph

144028 Commits

Author SHA1 Message Date
Richard Smith 54ecd9863f 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
2013-02-20 19:22:51 +00:00
Dan Gohman 5cdb345883 SIGQUIT is a "kill" signal, rather than an "int" signal, in this context.
llvm-svn: 175648
2013-02-20 19:15:01 +00:00
Andrew Kaylor fca968e13d Formatting, grammar
llvm-svn: 175647
2013-02-20 18:24:34 +00:00
Krzysztof Parzyszek 798679e140 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
2013-02-20 18:24:30 +00:00
Jakob Stoklund Olesen 623d8329e3 Use LiveRangeUpdater instead of mergeIntervalRanges.
Performance is the same, but LiveRangeUpdater has a more flexible
interface.

llvm-svn: 175645
2013-02-20 18:18:15 +00:00
Jakob Stoklund Olesen 521c708e6e 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
2013-02-20 18:18:12 +00:00
Andrew Kaylor 3d5d3101ed 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
2013-02-20 18:09:21 +00:00
Michael Liao 7fb39669ef 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
2013-02-20 18:04:21 +00:00
Chad Rosier a018cfd10c [ms-inline asm] Make the comment a bit more verbose.
llvm-svn: 175641
2013-02-20 18:03:44 +00:00
Jakob Stoklund Olesen 14a32d8682 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
2013-02-20 17:46:51 +00:00
Shankar Easwaran 8a1a4e7cf7 rename fixupAddend to relocAddend
llvm-svn: 175638
2013-02-20 17:42:00 +00:00
Chad Rosier 7ef6fd3402 [ms-inline asm] Remove this test while I investigate why eax isn't being clobbered.
llvm-svn: 175637
2013-02-20 17:39:31 +00:00
Shankar Easwaran 25832ede03 functionality to handle global atoms in Merge sections
llvm-svn: 175636
2013-02-20 17:38:37 +00:00
Bill Schmidt 6631e94838 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
2013-02-20 17:31:41 +00:00
Jyotsna Verma 7503a62bce 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
2013-02-20 16:13:27 +00:00
NAKAMURA Takumi f4652c32e8 Revert r175626, "ADT/Optional.h: Appease msvc."
Sorry, I didn't cover +Asserts, by accident. :(

llvm-svn: 175633
2013-02-20 15:52:44 +00:00
Bill Schmidt 51e7951e24 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
2013-02-20 15:50:31 +00:00
Alexander Potapenko 70b01558f1 [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
2013-02-20 15:46:02 +00:00
Manuel Klimek 0c91571d33 Fix regression in string literal alignment.
Now correctly indents (again):
a = a + "a"
        "a"
        "a";

llvm-svn: 175630
2013-02-20 15:32:58 +00:00
Alexander Potapenko 56821acc79 [ASan] Make isoc99_*scanf intercepted on Linux only. Those are unavailable on Darwin.
llvm-svn: 175629
2013-02-20 15:27:58 +00:00
Manuel Klimek 02f640a3ab 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
2013-02-20 15:25:48 +00:00
NAKAMURA Takumi 3389c55e10 Whitespace.
llvm-svn: 175627
2013-02-20 15:12:32 +00:00
NAKAMURA Takumi da782f58ab ADT/Optional.h: Appease msvc.
llvm-svn: 175626
2013-02-20 15:12:24 +00:00
Kostya Serebryany 7b989859a8 [asan] move preinit_test to Linux since on Mac __asan_init is called from ld-preload-ed runtime
llvm-svn: 175625
2013-02-20 15:10:22 +00:00
Edwin Vane ea8b062a56 Tweaks and fixes to cpp11-migrate generated tests
* Fixed a comment typo
* Changed 'autogen' to 'generated-tests'
* Made the clean target not fail if the 'generated-tests' directory
  doesn't already exist.

llvm-svn: 175624
2013-02-20 14:35:53 +00:00
Kostya Serebryany d8c29210e5 [asan] on linux, run __asan_init from .preinit_array (even earlier than before)
llvm-svn: 175623
2013-02-20 14:28:08 +00:00
Alexey Samsonov aadd1f2ad6 [Sanitizer] use raw syscall instead of _exit() function on Linux
llvm-svn: 175622
2013-02-20 13:54:32 +00:00
Benjamin Kramer 5c3e21ba55 Move the SplatByte helper to APInt and generalize it a bit.
llvm-svn: 175621
2013-02-20 13:00:06 +00:00
Daniel Jasper dc7d5817e2 Don't remove blank lines within unwrapped lines.
If the code author decides to put empty lines anywhere into the code we
should treat them equally, i.e. reduce them to the configured
MaxEmptyLinesToKeep.

With this change, we e.g. keep the newline in:
SomeType ST = {
  // First value
  a,

  // Second value
  b
};

llvm-svn: 175620
2013-02-20 12:56:39 +00:00
Elena Demikhovsky 0ccdd1315b I optimized the following patterns:
sext <4 x i1> to <4 x i64>
 sext <4 x i8> to <4 x i64>
 sext <4 x i16> to <4 x i64>
 
I'm running Combine on SIGN_EXTEND_IN_REG and revert SEXT patterns:
 (sext_in_reg (v4i64 anyext (v4i32 x )), ExtraVT) -> (v4i64 sext (v4i32 sext_in_reg (v4i32 x , ExtraVT)))
 
 The sext_in_reg (v4i32 x) may be lowered to shl+sar operations.
 The "sar" does not exist on 64-bit operation, so lowering sext_in_reg (v4i64 x) has no vector solution.

I also added a cost of this operations to the AVX costs table.

llvm-svn: 175619
2013-02-20 12:42:54 +00:00
Kostya Serebryany ac05bc0556 [asan] add a lit test for invoke-with-no-return instrumentation
llvm-svn: 175618
2013-02-20 12:37:22 +00:00
Kostya Serebryany 699ac28aa5 [asan] instrument invoke insns with noreturn attribute (as well as call insns)
llvm-svn: 175617
2013-02-20 12:35:15 +00:00
Logan Chien 53c18d8ac7 Fix thumbv5e frame lowering assertion failure.
It is possible that frame pointer is not found in the
callee saved info, thus FramePtrSpillFI may be incorrect
if we don't check the result of hasFP(MF).

Besides, if we enable the stack coloring algorithm, there
will be an assertion to ensure the slot is live.  But in
the test case, %var1 is not live in the prologue of the
function, and we will get the assertion failure.

Note: There is similar code in ARMFrameLowering.cpp.
llvm-svn: 175616
2013-02-20 12:21:33 +00:00
Evgeniy Stepanov ec1d286111 [sanitizer] Fix lint.
llvm-svn: 175615
2013-02-20 11:06:07 +00:00
Kostya Serebryany 8381ef2035 [asan] add test throw_call_test (broken with -static-libstdc++)
llvm-svn: 175614
2013-02-20 10:43:05 +00:00
Manuel Klimek 1998ea2c7e Implements breaking of string literals if they stick out.
An alternative strategy to calculating the break on demand when hitting
a token that would need to be broken would be to put all possible breaks
inside the token into the optimizer.

Currently only supports breaking at spaces; more break points to come.

llvm-svn: 175613
2013-02-20 10:15:13 +00:00
Bill Wendling cc5224ceb8 Remove target-specific features.
llvm-svn: 175610
2013-02-20 08:01:34 +00:00
Bill Wendling 4cdb88983d Use the attribute group reference instead of the attribute directly.
llvm-svn: 175609
2013-02-20 07:48:23 +00:00
David Blaikie 9db062ebdb Fully qualify llvm::next to avoid ambiguity when building as C++11.
llvm-svn: 175608
2013-02-20 07:39:20 +00:00
David Blaikie 725fda1213 Fix the (clang -Werror) build by removing an unused member variable.
llvm-svn: 175607
2013-02-20 07:39:18 +00:00
Bill Wendling c33fc4c004 Modify the tests to use attribute group references instead of listing the
function attributes.

llvm-svn: 175606
2013-02-20 07:22:19 +00:00
Bill Wendling 90bc19cd91 Modify the LLVM assembly output so that it uses references to represent function attributes.
This makes the LLVM assembly look better. E.g.:

     define void @foo() #0 { ret void }
     attributes #0 = { nounwind noinline ssp }

llvm-svn: 175605
2013-02-20 07:21:42 +00:00
Cameron Zwarich 8e60d4d240 Add support to the two-address pass for updating LiveIntervals in many of the
common transformations. This includes updating repairIntervalsInRange() to
handle more cases.

llvm-svn: 175604
2013-02-20 06:46:48 +00:00
Cameron Zwarich 2991feb0d3 Move the computation of the IsEarlyClobber flag into its own loop, since the
correct value is needed in every iteration of the loop for updating
LiveIntervals.

llvm-svn: 175603
2013-02-20 06:46:46 +00:00
Cameron Zwarich c04679f033 Modify LiveInterval::addRange() to match the comment about what it returns.
llvm-svn: 175602
2013-02-20 06:46:44 +00:00
Cameron Zwarich 2941482387 Add SlotIndexes::repairIndexesInRange(), which repairs SlotIndexes after adding
and removing instructions. The implementation seems more complicated than it
needs to be, but I couldn't find something simpler that dealt with all of the
corner cases.

Also add a call to repairIndexesInRange() from repairIntervalsInRange().

llvm-svn: 175601
2013-02-20 06:46:41 +00:00
Cameron Zwarich 26ef663c42 Make SlotIndex::getEntry() return unsigned to match IndexListEntry.
llvm-svn: 175600
2013-02-20 06:46:39 +00:00
Cameron Zwarich 11e8d50891 Fix a misunderstanding about how RegMaskBlocks works. This was caught by
assertions in the register allocator when running 'make check' without
LiveVariables.

llvm-svn: 175599
2013-02-20 06:46:36 +00:00
Cameron Zwarich 3673581de9 Remove verification after PHIElimination when using LiveIntervals, and move it
after the two-address pass. The remaining problems in 'make check' are occurring
later.

llvm-svn: 175598
2013-02-20 06:46:34 +00:00
Cameron Zwarich 68fbc4f642 Avoid recomputing an inserted instruction's SlotIndex.
llvm-svn: 175597
2013-02-20 06:46:32 +00:00