Commit Graph

141706 Commits

Author SHA1 Message Date
Michael Gottesman 9de6f96ad5 [ObjCARC] Refactored out the inner most 2-loops from PerformCodePlacement into the method ConnectTDBUTraversals.
The method PerformCodePlacement was doing too much (i.e. 3x loops, lots of
different checking). This refactoring separates the analysis section of the
method into a separate function while leaving the actual code placement and
analysis preparation in PerformCodePlacement.

*NOTE* Really this part of ObjCARC should be refactored out of the main pass
class into its own seperate class/struct. But, it is not time to make that
change yet though (don't want to make such an invasive change without fixing all
of the bugs first).

llvm-svn: 173201
2013-01-22 21:49:00 +00:00
Michael Liao 3dffc5e2b7 Fix an issue of pseudo atomic instruction DAG schedule
- Add list of physical registers clobbered in pseudo atomic insts
  Physical registers are clobbered when pseudo atomic instructions are
  expanded. Add them in clobber list to prevent DAG scheduler to
  mis-schedule them after these insns are declared side-effect free.
- Add test case from Michael Kuperstein <michael.m.kuperstein@intel.com>

llvm-svn: 173200
2013-01-22 21:47:38 +00:00
Kevin Enderby 81c944cadb Add a warning when there is a macro defintion that has named parameters but
the body does not use them and it appears the body has positional parameters.

This can cause unexpected results as in the added test case.  As the darwin
version of gas(1) which only supported positional parameters, happened to
ignore the named parameters.  Now that we want to support both styles of
macros we issue a warning in this specific case.

rdar://12861644

llvm-svn: 173199
2013-01-22 21:44:53 +00:00
Chad Rosier 10280a5ef4 Add a triple, per Ben's suggestion.
llvm-svn: 173198
2013-01-22 21:39:58 +00:00
Akira Hatanaka 88c0ec826c [mips] Implement MipsRegisterInfo::getRegPressureLimit.
llvm-svn: 173197
2013-01-22 21:34:25 +00:00
Bill Wendling 09175b39f2 More encapsulation work.
Use the AttributeSet when we're talking about more than one attribute. Add a
function that adds a single attribute. No functionality change intended.

llvm-svn: 173196
2013-01-22 21:15:51 +00:00
Kevin Enderby 0017d8a469 Have the integrated assembler give an error if $1 is used as an identifier in
an expression.  Currently this bug causes the line to be ignored in a
release build and an assert in a debug build.

rdar://13062484

llvm-svn: 173195
2013-01-22 21:09:20 +00:00
Chad Rosier 163ca0e95e Second attempt to fix ppc bots.
llvm-svn: 173193
2013-01-22 20:57:10 +00:00
Michael J. Spencer 4586fbcbad [Core] Move Resolver and SymbolTable over to TargetInfo.
No functionality change.

llvm-svn: 173192
2013-01-22 20:49:42 +00:00
Chad Rosier 0c0c02c479 Add x86 requirement to hopefully fix ppc bots.
llvm-svn: 173190
2013-01-22 20:16:41 +00:00
Akira Hatanaka f7d16d0563 [mips] Clean up code in MipsTargetLowering::LowerCall. No functional change
intended

llvm-svn: 173189
2013-01-22 20:05:56 +00:00
Adhemerval Zanella 5d874aeea9 PowerPC: fix __builtin_eh_return_data_regno return
llvm-svn: 173188
2013-01-22 20:02:45 +00:00
Chad Rosier e3aac2c864 [ms-inline asm] Remove the -fenable-experimental-ms-inline-asm flag. MS-style
inline assembly can be enable with -fasm-blocks or -fms-extensions alone.

llvm-svn: 173186
2013-01-22 19:38:32 +00:00
Ted Kremenek c0da34e6ab Split "discards qualifiers" warnings of -Wincompatible-pointer-types into subgroup.
This allows users to promote -Wincompatible-pointer-type warnings to
errors but keep those for "discard qualifiers" as warnings (if they
so desire).

Addresses <rdar://problem/13062738>.

llvm-svn: 173184
2013-01-22 19:32:27 +00:00
Dmitri Gribenko c6f1e56745 Update docs: nullptr conversion tool landed
llvm-svn: 173183
2013-01-22 19:22:22 +00:00
Fariborz Jahanian 177480645a Small code change to improve performance
in my last patch, suggested by Argyrios.

llvm-svn: 173182
2013-01-22 19:05:17 +00:00
Eli Bendersky 583860339b Add forgotten test case for the x32 commit
llvm-svn: 173181
2013-01-22 18:52:39 +00:00
Fariborz Jahanian 02447d80e4 objectiveC (take two): don't warn when in -Wselector mode and
an unimplemented selector is consumed by
"respondsToSelector:". // rdar://12938616

llvm-svn: 173179
2013-01-22 18:35:43 +00:00
Edwin Vane 44c3145938 Add use-nullptr transform to cpp11-migrate
This transform converts the usage of null pointer constants (e.g. NULL, 0,
etc.) in legacy C++ code and converts them to use the new C++11 nullptr
keyword.
- Added use-nullptr transform.
- Added C++11 support to the final syntax check. Used ArgumentAdjuster class to
  add -std=c++11 option to the command line options.
- Added tests for use-nullptr transform.
- Added tests that exercises both loop-convert and use-nullptr in the source
  file.

TODO: There's a known bug when using both -loop-convert and -use-nullptr at the
      same time.

Author: Tareq A Siraj <tareq.a.siraj@intel.com>
Reviewers: klimek, gribozavr
llvm-svn: 173178
2013-01-22 18:31:49 +00:00
Chad Rosier 33a6e11c21 [ms-inline asm] Remove a warning about ms-style inline assembly not being
supported.

llvm-svn: 173177
2013-01-22 18:18:22 +00:00
Benjamin Kramer fee7d21ae7 X86: Make sure we account for the FMA4 register immediate value, otherwise rip-rel relocations will be off by one byte.
PR15040.

llvm-svn: 173176
2013-01-22 18:05:59 +00:00
Eli Bendersky 0893e1079d Initial patch for x32 ABI support.
Add the x32 environment kind to the triple, and separate the concept of
pointer size and callee save stack slot size, since they're not equal
on x32.

llvm-svn: 173175
2013-01-22 18:02:49 +00:00
Howard Hinnant 2446649c1e Saleem Abdulrasool: If errno is defined as volatile int, the qualifier differences can cause
template typename deductions on swap<> (used in string.cpp).  Use
decltype(errno) to replicate the type and qualifier information for holding the
errno value.  Because errno is expected to be assignable, there is no need to
use typename std::remove_const<decltype(errno)>::type to hold the value.

llvm-svn: 173172
2013-01-22 17:26:08 +00:00
Douglas Gregor 7a6e20070d Make getDefinitiveDeclContext() actually return a DeclContext, as one
would expect, and clean up the return/break inconsistencies. Thanks,
Sebastian!

llvm-svn: 173171
2013-01-22 17:08:30 +00:00
Nico Weber bbe1394c96 Fix a bug in VarDecl::getSourceRange() for static member arrays with an element
type with an implicit initializer expression.

Patch from Will Wilson <will@indefiant.com>!

llvm-svn: 173170
2013-01-22 17:00:09 +00:00
Nico Weber 6029d4f3ae Formatter: Remove a fixme klimek fixed in r173168.
Add a few comments to the ObjC test cases.

llvm-svn: 173169
2013-01-22 16:53:59 +00:00
Manuel Klimek f92f7bc540 Implements more principled comment parsing.
Changing nextToken() in the UnwrappedLineParser to get the next
non-comment token. This allows us to correctly layout a whole class of
snippets, like:

if /* */(/* */ a /* */) /* */
  f() /* */; /* */
else /* */
  g();

Fixes a bug in the formatter where we would assume there is a previous
non-comment token.
Also adds the indent level of an unwrapped line to the debug output in
the parser.

llvm-svn: 173168
2013-01-22 16:31:55 +00:00
Shankar Easwaran 58ad41b563 change enum class to enum, as g++ doesnot support bitfields with enumerated classes with c++11 flag set
llvm-svn: 173166
2013-01-22 14:58:51 +00:00
Howard Hinnant f55c0db8b5 Saleem Abdulrasool: __terminate_handler and __unexpected_handler are defined but not used when
building against libsupc++ as the functions for which they are used are provided
by libsupc++.  Simply preprocess them away when building against libsupc++.

llvm-svn: 173165
2013-01-22 14:48:10 +00:00
Howard Hinnant 2ac1ae6150 Saleem Abdulrasool: Ensure that __GLIBCXX__ is defined when building with libsupc++.
llvm-svn: 173164
2013-01-22 14:44:06 +00:00
Dmitri Gribenko 44ee2e7a23 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: 173163
2013-01-22 14:39:21 +00:00
Evgeniy Stepanov fdf3fa69c2 [msan] Remove the trap handler code.
llvm-svn: 173161
2013-01-22 14:29:15 +00:00
Daniel Jasper 50e7ab7185 Let the formatter be more restrictive for breaking around . and ->
Before:
aaaaaaaaaaaaaaa(aaaaaaaaa, aaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaaa)
    .aaaaaaaaaaaaaaaaaa();

After:
aaaaaaaaaaaaaaa(aaaaaaaaa, aaaaaaaaa,
                aaaaaaaaaaaaaaaaaaaaaaa).aaaaaaaaaaaaaaaaaa();

llvm-svn: 173160
2013-01-22 14:28:24 +00:00
Alexey Samsonov ea83bafbda llvm-symbolizer: factor out bits of the tool into separate LLVMSymbolize.{h,cpp} files. No functionality change.
llvm-svn: 173159
2013-01-22 14:21:19 +00:00
Evgeniy Stepanov 03ee782bee [msan] Follow -msan-keep-going in reports from interceptors.
llvm-svn: 173158
2013-01-22 13:35:45 +00:00
Evgeniy Stepanov 8fdf7d0586 [msan] Fix linkage type of __msan_track_origins.
llvm-svn: 173157
2013-01-22 13:34:57 +00:00
Evgeniy Stepanov dcf6bcb904 [msan] Export the value of msan-keep-going flag for the runtime.
llvm-svn: 173156
2013-01-22 13:26:53 +00:00
Evgeniy Stepanov f9a7aba34a [msan] Simplify test code.
llvm-svn: 173155
2013-01-22 12:33:11 +00:00
Evgeniy Stepanov 2b65c0d1cf [msan] Test handling of volatile bitfields.
llvm-svn: 173154
2013-01-22 12:31:39 +00:00
Evgeniy Stepanov c4415591ed [msan] Do not insert check on volatile store.
Volatile bitfields can cause valid stores of uninitialized bits.

llvm-svn: 173153
2013-01-22 12:30:52 +00:00
Evgeniy Stepanov ef68259d26 [msan] Stop using volatile assignments as undef checks in MSan tests.
A runtime call is used instead.
MSan will stop adding shadow checks on volatile stores soon.

llvm-svn: 173152
2013-01-22 12:29:00 +00:00
Tim Northover 984b472161 Fix truncation of relocation types in Support/ELF.h
This is a follow-up to r171845, which fixes the same issue in the Support code.
Only targets with >256 relocations (principally AArch64) should be affected.

llvm-svn: 173151
2013-01-22 12:01:43 +00:00
Daniel Jasper 0b8206029b Fix "*" formatting when creating arrays of pointers.
Before: A = new int * [10]();
After:  A = new int *[10]();
llvm-svn: 173150
2013-01-22 11:46:26 +00:00
Alexander Potapenko 81f0b331dc [ASan] Disable the new/delete implementations for OSX
See https://code.google.com/p/address-sanitizer/issues/detail?id=131

llvm-svn: 173149
2013-01-22 11:39:28 +00:00
Chandler Carruth 0ba8db45c6 Begin fleshing out an interface in TTI for modelling the costs of
generic function calls and intrinsics. This is somewhat overlapping with
an existing intrinsic cost method, but that one seems targetted at
vector intrinsics. I'll merge them or separate their names and use cases
in a separate commit.

This sinks the test of 'callIsSmall' down into TTI where targets can
control it. The whole thing feels very hack-ish to me though. I've left
a FIXME comment about the fundamental design problem this presents. It
isn't yet clear to me what the users of this function *really* care
about. I'll have to do more analysis to figure that out. Putting this
here at least provides it access to proper analysis pass tools and other
such. It also allows us to more cleanly implement the baseline cost
interfaces in TTI.

With this commit, it is now theoretically possible to simplify much of
the inline cost analysis's handling of calls by calling through to this
interface. That conversion will have to happen in subsequent commits as
it requires more extensive restructuring of the inline cost analysis.

The CodeMetrics class is now really only in the business of running over
a block of code and aggregating the metrics on that block of code, with
the actual cost evaluation done entirely in terms of TTI.

llvm-svn: 173148
2013-01-22 11:26:02 +00:00
Alexey Samsonov 1e63b08575 ASan: add output test for -fsanitize-address-zero-based-shadow option on Linux
llvm-svn: 173146
2013-01-22 10:45:20 +00:00
NAKAMURA Takumi 6c03b6d005 ADT/SparseMultiSetTest.cpp: Try to appease cygwin-clang on stage2, take two. [-Wsign-compare]
llvm-svn: 173144
2013-01-22 10:39:31 +00:00
Alexander Potapenko dc00c44d46 [ASan] Remove the declarations of pthread_workqueue_t and pthread_workitem_handle_t, which are used no more.
Kudos to Jeremy Huddleston Sequoia <jeremyhu@apple.com>

llvm-svn: 173143
2013-01-22 10:32:06 +00:00
Alexey Samsonov d7b901d581 ASan: use Clang -fsanitize-blacklist flag in unit tests (instead of -mllvm)
llvm-svn: 173142
2013-01-22 10:30:17 +00:00
Tim Northover 98d9b7e1d4 Fix missed out llvm-stress after APFloat change.
llvm-svn: 173141
2013-01-22 10:18:26 +00:00