Commit Graph

139937 Commits

Author SHA1 Message Date
Bill Wendling 749a43d874 Use the predicate methods off of AttributeSet instead of Attribute.
llvm-svn: 171257
2012-12-30 13:50:49 +00:00
Bill Wendling 74dba875e2 Remove the Function::getRetAttributes method in favor of using the AttributeSet accessor method.
llvm-svn: 171256
2012-12-30 13:01:51 +00:00
Bill Wendling 94dcaf8e2b Remove Function::getParamAttributes and use the AttributeSet accessor methods instead.
llvm-svn: 171255
2012-12-30 12:45:13 +00:00
Bill Wendling 5e85be4326 Remove the Function::getFnAttributes method in favor of using the AttributeSet
directly.

This is in preparation for removing the use of the 'Attribute' class as a
collection of attributes. That will shift to the AttributeSet class instead.

llvm-svn: 171254
2012-12-30 10:32:17 +00:00
Bill Wendling 698e84fc4f Remove the Function::getFnAttributes method in favor of using the AttributeSet
directly.

This is in preparation for removing the use of the 'Attribute' class as a
collection of attributes. That will shift to the AttributeSet class instead.

llvm-svn: 171253
2012-12-30 10:32:01 +00:00
Bill Wendling 6190254e0f s/hasAttribute/contains/g to be more consistent with other method names.
llvm-svn: 171252
2012-12-30 09:17:46 +00:00
Nadav Rotem 0b37f14371 LoopVectorizer: Fix a bug in the code that updates the loop exiting block.
LCSSA PHIs may have undef values. The vectorizer updates values that are used by outside users such as PHIs.
The bug happened because undefs are not loop values. This patch handles these PHIs.

PR14725

llvm-svn: 171251
2012-12-30 07:47:00 +00:00
Dmitri Gribenko 56bf2e1830 Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ModuleID
This is done to avoid odd test failures, like the one fixed in r171243.

llvm-svn: 171250
2012-12-30 02:33:22 +00:00
Bill Wendling 3a554ac065 Add a few more c'tors:
* One that accepts a single Attribute::AttrKind.

* One that accepts an Attribute::AttrKind plus a list of values. This is for
  attributes defined like this:

    #1 = attributes { align = 4 }

* One that accepts a string, for target-specific attributes like this:

    #2 = attributes { "cpu=cortex-a8" }

llvm-svn: 171249
2012-12-30 02:22:16 +00:00
Dmitri Gribenko 10c4b4d249 Add a check to the test Analysis/ScalarEvolution/2010-09-03-RequiredTransitive.ll
This test did not test anything at all (except for opt crashing, but that was
not the reason why it was added).

llvm-svn: 171248
2012-12-30 01:42:34 +00:00
Bill Wendling b1d12619c9 Add a few (as yet unused) query methods to determine if the attribute that's
stored here is of a certain kind. This is in preparation for when an Attribute
object represents a single attribute, instead of a bitmask of attributes.

llvm-svn: 171247
2012-12-30 01:38:39 +00:00
Dmitri Gribenko b137c9e551 Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ModuleID
This is done to avoid odd test failures, like the one fixed in r171243.

llvm-svn: 171246
2012-12-30 01:28:40 +00:00
Bill Wendling 5e8ff877f4 Uniquify the AttributeImpl based on the Constant pointer, since those are
already uniquified.

Note: This will be expanded in the future to add more than just one pointer
value.

llvm-svn: 171245
2012-12-30 01:23:08 +00:00
Bill Wendling 3e4c4c9607 s/Raw/getBitMask/g to be more in line with current naming conventions. This method won't be sticking around.
llvm-svn: 171244
2012-12-30 01:05:42 +00:00
NAKAMURA Takumi 5a495a5c96 llvm/test/Transforms/GVN/null-aliases-nothing.ll: Fix a RUN line not to emit ModuleID.
Larry Evans reported it fails if source tree contains "load", like "download".

llvm-svn: 171243
2012-12-30 00:33:26 +00:00
Tobias Grosser ae2d83ec41 Formatting: Break lines after binary operators such as '&&'
assert(Condition
       && "Text");

->

assert(Condition &&
       "Text);

This aligns Polly with the style used in LLVM.

llvm-svn: 171242
2012-12-29 23:57:18 +00:00
Tobias Grosser 1bb59b0dcf Fix obvious formatting problems.
We fix the following formatting problems found by clang-format:

  - 80 cols violations
  - Obvious problems with missing or too many spaces
  - multiple new lines in a row

clang-format suggests many more changes, most of them falling in the following
two categories:

  1) clang-format does not at all format a piece of code nicely

  2) The style that clang-format suggests does not match the style used in
     Polly/LLVM

I consider differences caused by reason 1) bugs, which should be fixed by
improving clang-format. Differences due to 2) need to be investigated closer
to understand the cause of the difference and the solution that should be taken.

llvm-svn: 171241
2012-12-29 23:47:38 +00:00
Rafael Espindola 9463dce9bf Don't warn for undefined but used decls that are external because of a typedef.
This fixes pr14736. It is fairly ugly, but I don't think we can do much better
as we have to wait at least until the end of the typedef to know if the
function will have external linkage or not.

llvm-svn: 171240
2012-12-29 23:43:00 +00:00
Nico Weber 9dff378a12 ArrayRefize CXXTryStmt.
llvm-svn: 171239
2012-12-29 20:13:03 +00:00
Nico Weber a2a0eb940a ArrayRefize a CompoundStmt constructor.
llvm-svn: 171238
2012-12-29 20:03:39 +00:00
Craig Topper fe82eb6bcd Remove intrinsic specific instructions for (V)SQRTPS/PD. Instead lower to target-independent ISD nodes and use the existing patterns for those.
llvm-svn: 171237
2012-12-29 18:18:20 +00:00
Howard Hinnant a96d74585f Remove test for eof from istreambuf_iterator constructors. It is no longer necessary and potentially violates the constructor's noexcept spec.
llvm-svn: 171232
2012-12-29 17:45:42 +00:00
Tobias Grosser 16242dab74 www: Add news to Polly website
llvm-svn: 171231
2012-12-29 17:40:09 +00:00
Craig Topper f4a9c6e21b Merge similar functionality using a nested switch.
llvm-svn: 171229
2012-12-29 17:19:06 +00:00
Tobias Grosser 317b5ef24d www: Add new Polly publication
Polly - Performing polyhedral optimizations on a low-level intermediate
representation

Tobias Grosser, Armin Groesslinger, Christian Lengauer Parallel
Processing Letters 2012 22:04

llvm-svn: 171228
2012-12-29 16:47:41 +00:00
Craig Topper 6b27251a76 Remove intrinsic specific instructions for SSE/SSE2/AVX floating point max/min instructions. Lower them to target specific nodes and use those patterns instead. This also allows them to be commuted if UnsafeFPMath is enabled.
llvm-svn: 171227
2012-12-29 16:44:25 +00:00
Jakub Staszak 215f94143c Simplify code, no functionality change.
llvm-svn: 171226
2012-12-29 15:57:26 +00:00
Jakub Staszak afe8109fce Delete executive bit on ./lib/Target/Hexagon/HexagonAsmPrinter.h.
llvm-svn: 171225
2012-12-29 15:23:06 +00:00
Tobias Grosser 7a2f39534f 'chmod -x' on files that do not need the executable bits
llvm-svn: 171224
2012-12-29 15:09:03 +00:00
Kostya Serebryany 9756e2e0b3 [asan] make LargeOOBInMemset test resistant to clever compiler optimizations
llvm-svn: 171223
2012-12-29 14:42:48 +00:00
Chandler Carruth 19e8beaad6 Fix a typo that caused a few standard library implementations of sort to
get the wrong answer. Wasn't caught by my implementation sadly...

llvm-svn: 171222
2012-12-29 13:00:47 +00:00
Bill Wendling 0cd0f7f832 Use a 'Constant' object instead of a bit field to store the attribute data.
llvm-svn: 171221
2012-12-29 12:29:38 +00:00
Bill Wendling 4fdde84613 Use the accessor method instead of the raw ivar to get the bits.
llvm-svn: 171220
2012-12-29 12:10:46 +00:00
Chandler Carruth 5193dfca24 Try to re-structure the GCCVersion comparison routine to make it easier
to read and tell that it is a SWO -- we now descend through the
components and return a result at the first inequal component.

Also comment it a bit better and make it a total ordering by sorting on
the text of the suffix if necessary.

None of this should really be a visible change.

llvm-svn: 171219
2012-12-29 12:01:08 +00:00
Erik Verbruggen 3f27d4e05a Removed duplicate logic.
llvm-svn: 171218
2012-12-29 11:27:03 +00:00
Kostya Serebryany b3d04ede8c [asan] add a new interface function __asan_describe_address, useful for running asan-ified binary under a debugger (e.g. gdb)
llvm-svn: 171217
2012-12-29 10:18:31 +00:00
Rafael Espindola db7325e56e Minor cleanup.
DS parameter  has a default (null) value anyway, so there's no need for an
if/else here.
Patch by Nikola Smiljanić.

llvm-svn: 171210
2012-12-29 01:09:46 +00:00
Howard Hinnant bd037ab4ba Saleem Abdulrasool: GCC complains about the template functions as potentially not being able to be
inlined.  These do not need to be always-inlined for ABI stability because they are not exported beyond this source due to the unnamed namespace.
Also simplified use of the Wmissing-field-initializers pragma as was done for clang.

llvm-svn: 171202
2012-12-28 18:15:01 +00:00
Kostya Serebryany 9479a85963 [asan] fix a build warning
llvm-svn: 171200
2012-12-28 15:55:43 +00:00
Kostya Serebryany 1cc54f0218 [asan] one more change missed at r171198
llvm-svn: 171199
2012-12-28 15:28:19 +00:00
Kostya Serebryany cb510e50e2 [asan] implement more strict checking for memset/etc parameters. Instead of checking the first and the last byte, we check the entire shadow region. This costs ~10 slowdown for the instrumented functions. Motivated by a nasty memset-buffer-overflow-by-140-bytes in chrome which was reported as a use-after-free or not at all
llvm-svn: 171198
2012-12-28 15:24:16 +00:00
Chandler Carruth 405d681340 Nuke some dead code that snuck in some how. I thought I had already
deleted this, but apparantly not. Charmingly, Clang didn't warn on it
but GCC did.

llvm-svn: 171197
2012-12-28 14:50:51 +00:00
Chandler Carruth 86ed53089f Fix a stunning oversight in the inline cost analysis. It was never
propagating one of the values it simplified to a constant across
a myriad of instructions. Notably, ptrtoint instructions when we had
a constant pointer (say, 0) didn't propagate that, blocking a massive
number of down-stream optimizations.

This was uncovered when investigating why we fail to inline and delete
the boilerplate in:

  void f() {
    std::vector<int> v;
    v.push_back(1);
  }

It turns out most of the efforts I've made thus far to improve the
analysis weren't making it far purely because of this. After this is
fixed, the store-to-load forwarding patch enables LLVM to optimize the
above to an empty function. We still can't nuke a second push_back, but
for different reasons.

There is a very real chance this will cause somewhat noticable changes
in inlining behavior, so please let me know if you see regressions (or
improvements!) because of this patch.

llvm-svn: 171196
2012-12-28 14:43:42 +00:00
Chandler Carruth 753e21d057 Teach the inline cost analysis about calls that can be simplified and
how to propagate constants through insert and extract value
instructions.

With the recent improvements to instsimplify, this allows inline cost
analysis to constant fold through intrinsic functions, including notably
the with.overflow intrinsic math routines which often show up inside of
STL abstractions. This is yet another piece in the puzzle of breaking
down the code for:

  void f() {
    std::vector<int> v;
    v.push_back(1);
  }

But it still isn't enough. There are a pile of bugs in inline cost still
blocking this.

llvm-svn: 171195
2012-12-28 14:23:32 +00:00
Chandler Carruth f6182155f6 Teach instsimplify to use the constant folder where appropriate for
constant folding calls. Add the initial tests for this which show that
now instsimplify can simplify blindingly obvious code patterns expressed
with both intrinsics and library calls.

llvm-svn: 171194
2012-12-28 14:23:29 +00:00
Rafael Espindola 576127d90e Reject overloading of two static extern C functions.
This patch moves hasCLanguageLinkage to be VarDecl and FunctionDecl methods
so that they can be used from SemaOverload.cpp and then fixes the logic
in Sema::IsOverload.

llvm-svn: 171193
2012-12-28 14:21:58 +00:00
Richard Smith 9e575dafad Replace magic numbers in CheckICE with an enum.
llvm-svn: 171192
2012-12-28 13:25:52 +00:00
Richard Smith 74fc72143a PR14729: Fix typo in CheckICE for BinaryConditionalOperators.
llvm-svn: 171191
2012-12-28 12:53:55 +00:00
Richard Smith de1a487402 Improve diagnostic wording for when an implicitly-deleted special member
function is selected by overload resolution.

llvm-svn: 171190
2012-12-28 12:23:24 +00:00
Chandler Carruth 9dc3558920 Add entry points to instsimplify for simplifying calls. The entry points
are nice and decomposed so that we can simplify synthesized calls as
easily as actually call instructions. The internal utility still has the
same behavior, it just now operates on a more generic interface so that
I can extend the set of call simplifications that instsimplify knows
about.

llvm-svn: 171189
2012-12-28 11:30:55 +00:00