Commit Graph

139965 Commits

Author SHA1 Message Date
Chandler Carruth 5473dfb099 Switch this code to a more idiomatic double using namespace directive.
Fix a truly odd namespace qualifier that was flat out wrong in the
process. The fully qualified namespace would have been
llvm::sys::TimeValue, llvm::TimeValue makes no sense.

llvm-svn: 171292
2012-12-31 11:45:20 +00:00
Chandler Carruth 304de3c424 Delete a cut/paste-o from r171290. Very sorry about the noise.
llvm-svn: 171291
2012-12-31 11:40:04 +00:00
Chandler Carruth 5412246d8b Suppress a MSVC warning complaining about the code working as intended.
llvm-svn: 171290
2012-12-31 11:39:02 +00:00
Chandler Carruth 97683aa2fa Begin sketching out the process interface.
The coding style used here is not LLVM's style because this is modeled
after a Boost interface and thus done in the style of a candidate C++
standard library interface. I'll probably end up proposing it as
a standard C++ library if it proves to be reasonably portable and
useful.

This is just the most basic parts of the interface -- getting the
process ID out of it. However, it helps sketch out some of the boiler
plate such as the base class, derived class, shared code, and static
factory function. It also introduces a unittest so that I can
incrementally ensure this stuff works.

However, I've not even compiled this code for Windows yet. I'll try to
fix any Windows fallout from the bots, and if I can't fix it I'll revert
and get someone on Windows to help out. There isn't a lot more that is
mandatory, so soon I'll switch to just stubbing out the Windows side and
get Michael Spencer to help with implementation as he can test it
directly.

llvm-svn: 171289
2012-12-31 11:17:50 +00:00
Chandler Carruth c457907708 Start sketching out a roadmap for better subprocess management in the
LLVM libraries. Also, clean up the doxygen and formatting of the
existing interfaces.

With this change I'm calling the existing interface "legacy" because I'd
like to replace it with something much better. My end goal is to expose
a common set of interfaces for inspecting various properties of
a process, and implementations to expose those both for the current
process and for child processes. This will also expose more rich
interfaces for spawning and controling a subprocess, notably to use
system calls like wait3 and wait4 where available and gather detailed
resource usage stats about the subprocess.

My plan (discussed with Michael Spencer on IRC) is to base this loosely
around the proposed Boost.Process interface, but to implement
a relatively small subset of that functionality based around the needs
of LLVM, Clang, the Clang driver, etc.

llvm-svn: 171285
2012-12-31 09:29:16 +00:00
Chris Lattner f5cca68c2c Fix LICM's memory promotion optimization to preserve TBAA tags when
promoting a store in a loop.  This was noticed when working on PR14753,
but isn't directly related.

llvm-svn: 171281
2012-12-31 08:37:17 +00:00
Chris Lattner eeefe1bc07 teach instcombine to preserve TBAA tag when merging two stores, part of
PR14753

llvm-svn: 171279
2012-12-31 08:10:58 +00:00
Will Dietz 82f61bf4b6 [ubsan] Don't suggest casting to unsigned for unsigned unary minus overflow.
Fixed version of r171273.

llvm-svn: 171278
2012-12-31 06:36:44 +00:00
Chandler Carruth 5f8061bc36 Revert r171273 which doesn't actually compile.
Original commit message:
[ubsan] Don't suggest casting to unsigned for unsigned unary minus overflow.

llvm-svn: 171277
2012-12-31 06:16:47 +00:00
Chandler Carruth e70a813b59 Don't mark variadic functions as always inline -- they cannot in fact be
inlined.

Patch by Saleem Abdulrasool, reviewed by Michael Spencer and Richard Smith.

llvm-svn: 171276
2012-12-31 06:09:54 +00:00
Chandler Carruth 3036ab26e3 Add a simple .arcconfig to make using the 'arc' commandline tool and the
phabricator code review site easier with libc++.

llvm-svn: 171275
2012-12-31 05:59:45 +00:00
Nico Weber 965368743e Fix minor copy-pasto. No functionality change.
llvm-svn: 171274
2012-12-31 02:59:14 +00:00
Will Dietz d6cd3203f6 [ubsan] Don't suggest casting to unsigned for unsigned unary minus overflow.
llvm-svn: 171273
2012-12-31 02:20:55 +00:00
Jakub Staszak f584977df2 Grammo.
llvm-svn: 171272
2012-12-31 01:40:44 +00:00
Bill Wendling 6e95ae803a Remove the getAttributesAtIndex and getNumAttrs methods in favor of using the getAttrSomewhere predicate. This prevents the uses of 'Attribute' as a collection of attributes.
llvm-svn: 171271
2012-12-31 00:49:59 +00:00
Jakub Staszak ea2b9b9d67 Transform (A == C1 || A == C2) into (A & ~(C1 ^ C2)) == C1
if C1 and C2 differ only with one bit.
Fixes PR14708.

llvm-svn: 171270
2012-12-31 00:34:55 +00:00
Nico Weber a7c7e60764 Remove some remnants of OwningExprResult / OwningStmtResult.
These got deleted late 2010 during the Actions/Sema unification.
No functionality change.

llvm-svn: 171269
2012-12-31 00:28:03 +00:00
Nico Weber a48b6c2bba Simplify. No functionality change.
llvm-svn: 171268
2012-12-30 23:36:56 +00:00
Rafael Espindola ea7537f2a2 Don't warn on unused member functions that are extern because of a typedef.
llvm-svn: 171267
2012-12-30 21:42:26 +00:00
Dmitri Gribenko 58d64e2bb1 Formatter: parse and format inline namespaces like regular namespaces
This changes formatting from:

inline namespace X {
  class A {
  };
}

to:

inline namespace X {
class A {
};
}

llvm-svn: 171266
2012-12-30 21:27:25 +00:00
Will Dietz 2a5f569d88 [ubsan] Update test now that check recovery is default and has driver flag.
llvm-svn: 171265
2012-12-30 20:53:39 +00:00
Will Dietz 3676d56b71 [ubsan] Recover by default, use -fno-sanitize-recover to disable.
llvm-svn: 171264
2012-12-30 20:53:28 +00:00
Rafael Espindola a5c892058c Use hasCLanguageLinkage when warning about non C return types.
llvm-svn: 171263
2012-12-30 20:40:41 +00:00
Dmitri Gribenko 10af67a9c3 Comment lexing: replace manual comparison with StringRef::find_first_of
This gives an about 1.8% improvement on Clang bootstrap with -Wdocumentation

llvm-svn: 171262
2012-12-30 19:45:46 +00:00
Hal Finkel 6dbdd4307b Support ppcf128 in SelectionDAG::getConstantFP
Fixes pr14751.

Patch by Kai; Thanks!

llvm-svn: 171261
2012-12-30 19:03:32 +00:00
Rafael Espindola 5cab029e4b Don't get confused if a extern "C" builtin function is redeclared without
the extern "C".

llvm-svn: 171260
2012-12-30 17:23:09 +00:00
Nuno Lopes b6ad98224a convert a bunch of callers from DataLayout::getIndexedOffset() to GEP::accumulateConstantOffset().
The later API is nicer than the former, and is correct regarding wrap-around offsets (if anyone cares).
There are a few more places left with duplicated code, which I'll remove soon.

llvm-svn: 171259
2012-12-30 16:25:48 +00:00
Dmitri Gribenko 12be928dfb Documentation: add a section to prevent spurious test failures like the one
fixed in r171243.

llvm-svn: 171258
2012-12-30 14:51:03 +00:00
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