Commit Graph

143242 Commits

Author SHA1 Message Date
Jakob Stoklund Olesen 63e5b4c269 Turn on -new-live-intervals by default.
This uses a liveness algorithm that does not depend on data from the
LiveVariables analysis, it is the first step towards removing
LiveVariables completely.

llvm-svn: 174774
2013-02-08 23:18:37 +00:00
Jordan Rose cea01ee939 CMake: Use check_symbol_exists instead of check_cxx_symbol_exists.
check_cxx_symbol_exists requires CMake 2.8.6, so even though I
recommended it to Owen it's probably better to stay away for now.
This check is not technically correct because we're checking <math.h>
but then using <cmath> in the actual code, but if we run into problems we
can do the same sort of dance as isinf() and isnan() where we check /both/
headers and then write a wrapper header around them.

llvm-svn: 174773
2013-02-08 23:17:31 +00:00
Sean Callanan 29214ab1ce Fixed a crash when we didn't get a plist but tried
to pass it to CFGetTypeID() anyway.

<rdar://problem/13181904>

llvm-svn: 174772
2013-02-08 23:17:17 +00:00
Richard Smith f89ffcd705 configure: when performing a compiler feature test for a -Wno-foo flag, attempt
to use -Wfoo instead of -Wno-foo. This works around a bug in some versions of
gcc, where it will silently accept an unknown -Wno-foo option, but will
generate an error for a compile which uses -Wno-foo if that compile also
triggers any warnings.

llvm-svn: 174770
2013-02-08 22:55:10 +00:00
Jordan Rose 388d767ab1 CharInfo: Add missing "using namespace clang::charinfo" in .cpp file.
Should fix the MSC bot.

llvm-svn: 174769
2013-02-08 22:37:49 +00:00
Jordan Rose a7d03840e6 Excise <cctype> from Clang (except clang-tblgen) in favor of CharInfo.h.
Nearly all of these changes are one-to-one replacements; the few that
aren't have to do with custom identifier validation.

llvm-svn: 174768
2013-02-08 22:30:41 +00:00
Jordan Rose a08ed5965c Simplify logic for avoiding concatenation after numeric constants.
I threw in a couple of test cases for UD-suffixes -- already working, but
it wasn't immediately obvious to me.

llvm-svn: 174767
2013-02-08 22:30:31 +00:00
Jordan Rose 00d1b59184 StmtPrinter: Write large char values using \u or \U.
This may not always be valid, but we were previously just
emitting them raw.

While here, s/isprint/isPrintable/ (using the new CharInfo).

llvm-svn: 174766
2013-02-08 22:30:27 +00:00
Jordan Rose a2100d755a Pull Lexer's CharInfo table out for general use throughout Clang.
Rewriting the same predicates over and over again is bad for code size and
code maintainence. Using the functions in <ctype.h> is generally unsafe
unless they are specified to be locale-independent (i.e. only isdigit and
isxdigit).

The next commit will try to clean up uses of <ctype.h> functions within Clang.

llvm-svn: 174765
2013-02-08 22:30:22 +00:00
Tom Stellard 72fffbab66 ReleaseNotes: Add section for R600 backend
llvm-svn: 174764
2013-02-08 22:24:41 +00:00
Tom Stellard 47d4201348 R600: Dump the function name when TargetLowering::LowerCall() fails
Also output a more useful error message.

NOTE: This is a candidate for the Mesa stable branch
llvm-svn: 174763
2013-02-08 22:24:40 +00:00
Tom Stellard 7370ede2cd R600: rework flow creation in the structurizer v2
This fixes a couple of bugs and incorrect assumptions,
in total four more piglit tests now pass.

v2: fix small bug in the dominator updating

Patch by: Christian König

Signed-off-by: Christian König <christian.koenig@amd.com>
llvm-svn: 174762
2013-02-08 22:24:38 +00:00
Tom Stellard 048f14fd3b R600: fix loop analyses in the structurizer
Patch by: Christian König

Intersecting loop handling was wrong.

Signed-off-by: Christian König <christian.koenig@amd.com>
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 174761
2013-02-08 22:24:37 +00:00
Tom Stellard 7ec0e4fbe3 R600: fix PHI value adding in the structurizer
Otherwise we sometimes produce invalid code.

Patch by: Christian König

Signed-off-by: Christian König <christian.koenig@amd.com>
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 174760
2013-02-08 22:24:35 +00:00
Ted Kremenek e0cdd752d5 Note that checker-271 is newer than the analyzer in Xcode 4.6
llvm-svn: 174759
2013-02-08 22:19:43 +00:00
Ted Kremenek b3cbef4ad2 Update open source checker build to checker-271.
llvm-svn: 174758
2013-02-08 22:18:26 +00:00
Greg Clayton 2452ab7fa8 Fixed 2 more issues found by the address sanitizer:
1 - A store off the end of a buffer in ValueObject.cpp
2 - DataExtractor had cases where bad offsets could cause invalid memory to be accessed.

llvm-svn: 174757
2013-02-08 22:02:02 +00:00
Dan Gohman b2f426c40e Minor cleanup.
llvm-svn: 174756
2013-02-08 22:01:47 +00:00
Greg Clayton aa4c47a5b1 Fixed a store to data that isn't needed and that also could end up writing beyond the end of the buffer. This was found by the address sanitizer.
llvm-svn: 174755
2013-02-08 21:59:34 +00:00
Greg Clayton 0dd5e7b598 Unset the environment variables as soon as possible when running the test suite. Also don't store the unset list into a global when they aren't needed in a global variable.
llvm-svn: 174750
2013-02-08 21:52:32 +00:00
Sean Silva 7adbc0eaa4 [docs] Tweaks for clarity, readability, and correctness.
llvm-svn: 174749
2013-02-08 21:51:26 +00:00
Bob Wilson bfb44ef9cb Revert "Add LLVMContext::emitWarning methods and use them. <rdar://problem/12867368>"
This reverts r171041. This was a nice idea that didn't work out well.
Clang warnings need to be associated with warning groups so that they can
be selectively disabled, promoted to errors, etc. This simplistic patch didn't
allow for that. Enhancing it to provide some way for the backend to specify
a front-end warning type seems like overkill for the few uses of this, at
least for now.

llvm-svn: 174748
2013-02-08 21:48:29 +00:00
Reed Kotler b9bf8dca47 Add the 16 bit version of addiu. To the assembler, the 16 and 32 bit are the
same so we put in the comment field an indicator when we think we are
emitting the 16 bit version. For the direct object emitter, the difference is 
important as well as for other passes which need an accurate count of 
program size. There will be other similar putbacks to this for various
instructions.

llvm-svn: 174747
2013-02-08 21:42:56 +00:00
Hal Finkel 2581905f81 DAGCombiner: Constant folding around pre-increment loads/stores
Previously, even when a pre-increment load or store was generated,
we often needed to keep a copy of the original base register for use
with other offsets. If all of these offsets are constants (including
the offset which was combined into the addressing mode), then this is
clearly unnecessary. This change adjusts these other offsets to use the
new incremented address.

llvm-svn: 174746
2013-02-08 21:35:47 +00:00
Douglas Gregor 8d7edced83 Always keep highest identifier, selector, and macro IDs when we've
read another one, just as we do for types.

llvm-svn: 174745
2013-02-08 21:30:59 +00:00
Douglas Gregor dadd85dc0c Never cache the result of a module file lookup.
llvm-svn: 174744
2013-02-08 21:27:45 +00:00
Hal Finkel dd2721842d BBVectorize: Use TTI->getAddressComputationCost
This is a follow-up to the cost-model change in r174713 which splits
the cost of a memory operation between the address computation and the
actual memory access. In r174713, this cost is always added to the
memory operation cost, and so BBVectorize will do the same.

Currently, this new cost function is used only by ARM, and I don't
have any ARM test cases for BBVectorize. Assistance in generating some
good ARM test cases for BBVectorize would be greatly appreciated!

llvm-svn: 174743
2013-02-08 21:13:39 +00:00
Bill Schmidt 995bc3f721 More modifications to PowerPC doc links
llvm-svn: 174742
2013-02-08 21:08:22 +00:00
Bob Wilson 67bbf3aa0c Revert 172027 and 174336. Remove diagnostics about over-aligned stack objects.
Aside from the question of whether we report a warning or an error when we
can't satisfy a requested stack object alignment, the current implementation
of this is not good.  We're not providing any source location in the diagnostics
and the current warning is not connected to any warning group so you can't
control it.  We could improve the source location somewhat, but we can do a
much better job if this check is implemented in the front-end, so let's do that
instead.  <rdar://problem/13127907>

llvm-svn: 174741
2013-02-08 20:35:15 +00:00
Hal Finkel f3f32d0193 Update PowerPC links in CompilerWriterInfo.rst
This updates the current references to links that work for me.
In the future, we should update the list of references itself to provide
information on newer architecture variants.

Thanks to Sean Silva for pointing out that the current links were broken!

llvm-svn: 174739
2013-02-08 20:24:46 +00:00
Manuel Klimek f92b666da9 Adapt test to new clang-format behavior.
llvm-svn: 174738
2013-02-08 20:04:33 +00:00
Manuel Klimek d076dcd54f Fix indentation-detection at indent level 0.
This correctly formats:
  {
    a;
  }
where { is incorrectly indented by 2, but is at level 0, when
reformatting only 'a;'.

llvm-svn: 174737
2013-02-08 19:53:32 +00:00
Ted Kremenek ca3ed7230d Teach BugReporter (extensive diagnostics) to emit a diagnostic when a loop body is skipped.
Fixes <rdar://problem/12322528>.

llvm-svn: 174736
2013-02-08 19:51:43 +00:00
Enrico Granata e214a024e0 This checkin implements the data formatter for NSURL in C++ code
llvm-svn: 174735
2013-02-08 19:28:04 +00:00
Argyrios Kyrtzidis ba91ab65aa [libclang] Add a test to make sure annotation works fine in the presence of
'override' on the method.

This was fixed in a previous commit, generally handling attributes that are at the
end of the declaration.

rdar://13140589

llvm-svn: 174734
2013-02-08 19:27:23 +00:00
Howard Hinnant af00dc0420 Michael van der Westhuizen: Update instructions for building on Linux.
llvm-svn: 174733
2013-02-08 19:10:36 +00:00
Howard Hinnant 50232e50d8 Add Michael van der Westhuizen to CREDITS.TXT
llvm-svn: 174732
2013-02-08 19:08:06 +00:00
Howard Hinnant 0e2f292a30 Michael van der Westhuizen: update to CMake.
llvm-svn: 174731
2013-02-08 19:04:53 +00:00
Ted Kremenek 20a43dc29c Remove stale instance variable.
llvm-svn: 174730
2013-02-08 18:59:17 +00:00
Fariborz Jahanian 4254cdb7ed objective-C modern translation: Fix another random translation bug
involving property getter expressions on rhs of property setter.
// rdar://13138459

llvm-svn: 174729
2013-02-08 18:57:50 +00:00
Daniel Dunbar ceb47bb06d [tests] Another batch of timeout increases.
llvm-svn: 174726
2013-02-08 18:26:55 +00:00
Bill Schmidt 62fe7a5b17 Refine fix to bug 15041.
Thanks to help from Nadav and Hal, I have a more reasonable (and even
correct!) approach.  This specifically penalizes the insertelement
and extractelement operations for the performance hit that will occur
on PowerPC processors.

llvm-svn: 174725
2013-02-08 18:19:17 +00:00
Chad Rosier 22d275f7b8 [SimplifyLibCalls] Library call simplification doen't work if the call site
isn't using the default calling convention.  However, if the transformation is
from a call to inline IR, then the calling convention doesn't matter.
rdar://13157990

llvm-svn: 174724
2013-02-08 18:00:14 +00:00
Jakob Stoklund Olesen 479e5a9313 Typos.
llvm-svn: 174723
2013-02-08 17:43:32 +00:00
Daniel Dunbar 76efb57666 [tests] Add back stdc macros I accidentally refactored out.
- Patch by Michael van der Westhuizen:
--
r174404 accidentally removed stdc format, limit and constant macros from the Linux test runner logic.  This small patch re-adds the macros.

Making this change fixes the following tests on Linux:
 - depr/depr.c.headers/inttypes_h.pass.cpp
 - depr/depr.c.headers/stdint_h.pass.cpp
 - input.output/file.streams/c.files/cinttypes.pass.cpp
 - language.support/cstdint/cstdint.syn/cstdint.pass.cpp
--

llvm-svn: 174722
2013-02-08 17:41:28 +00:00
Daniel Dunbar 577e696425 [tests] Increase a bunch of wait limits.
- Basically I just ran the thread tests many many times on a busy machine and
   bumped the timeouts whenever I hit a test failure.

 - This is obviously subpar, but is the best I can do without the tests being
   rewritten to not depend on arbitrary timeouts.

llvm-svn: 174721
2013-02-08 17:41:19 +00:00
Manuel Klimek b95f5450a9 Takes the context into account when re-indenting regions.
Fixes llvm.org/PR14916.

llvm-svn: 174720
2013-02-08 17:38:27 +00:00
Fariborz Jahanian e8730a3558 objective-C modern translator. Fixes a trivial
rewriting bug where #ifdef ended up on the same
line as the attribute declaration.

llvm-svn: 174719
2013-02-08 17:15:07 +00:00
Daniel Jasper 8360a86c8c Fix handling of fake parenthesis during formatting.
They are much easier to handle when attached to the previous token.

Before:
unsigned Indent =
    formatFirstToken(TheLine.First, IndentForLevel[TheLine.Level] >=
                                    0 ? IndentForLevel[TheLine.Level]
: TheLine.Level * 2, TheLine.InPPDirective, PreviousEndOfLineColumn);

After:
unsigned Indent = formatFirstToken(
    TheLine.First, IndentForLevel[TheLine.Level] >= 0
                       ? IndentForLevel[TheLine.Level] : TheLine.Level * 2,
    TheLine.InPPDirective, PreviousEndOfLineColumn);

llvm-svn: 174718
2013-02-08 16:49:27 +00:00
David Tweed a6016e4351 The patch to fix some issues in r174543 fixed the lines failing the test, but missed a couple
of lines which weren't being explicitly looked at and were printing incorrect results. These
values clearly must lie within 32 bits, so the casts are definitely safe.

llvm-svn: 174717
2013-02-08 16:35:10 +00:00