Jordan Rose [Fri, 8 Feb 2013 22:30:31 +0000 (22:30 +0000)]
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
Jordan Rose [Fri, 8 Feb 2013 22:30:27 +0000 (22:30 +0000)]
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
Jordan Rose [Fri, 8 Feb 2013 22:30:22 +0000 (22:30 +0000)]
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
Tom Stellard [Fri, 8 Feb 2013 22:24:41 +0000 (22:24 +0000)]
ReleaseNotes: Add section for R600 backend
llvm-svn: 174764
Tom Stellard [Fri, 8 Feb 2013 22:24:40 +0000 (22:24 +0000)]
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
Tom Stellard [Fri, 8 Feb 2013 22:24:38 +0000 (22:24 +0000)]
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
Tom Stellard [Fri, 8 Feb 2013 22:24:37 +0000 (22:24 +0000)]
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
Tom Stellard [Fri, 8 Feb 2013 22:24:35 +0000 (22:24 +0000)]
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
Ted Kremenek [Fri, 8 Feb 2013 22:19:43 +0000 (22:19 +0000)]
Note that checker-271 is newer than the analyzer in Xcode 4.6
llvm-svn: 174759
Ted Kremenek [Fri, 8 Feb 2013 22:18:26 +0000 (22:18 +0000)]
Update open source checker build to checker-271.
llvm-svn: 174758
Greg Clayton [Fri, 8 Feb 2013 22:02:02 +0000 (22:02 +0000)]
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
Dan Gohman [Fri, 8 Feb 2013 22:01:47 +0000 (22:01 +0000)]
Minor cleanup.
llvm-svn: 174756
Greg Clayton [Fri, 8 Feb 2013 21:59:34 +0000 (21:59 +0000)]
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
Greg Clayton [Fri, 8 Feb 2013 21:52:32 +0000 (21:52 +0000)]
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
Sean Silva [Fri, 8 Feb 2013 21:51:26 +0000 (21:51 +0000)]
[docs] Tweaks for clarity, readability, and correctness.
llvm-svn: 174749
Bob Wilson [Fri, 8 Feb 2013 21:48:29 +0000 (21:48 +0000)]
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
Reed Kotler [Fri, 8 Feb 2013 21:42:56 +0000 (21:42 +0000)]
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
Hal Finkel [Fri, 8 Feb 2013 21:35:47 +0000 (21:35 +0000)]
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
Douglas Gregor [Fri, 8 Feb 2013 21:30:59 +0000 (21:30 +0000)]
Always keep highest identifier, selector, and macro IDs when we've
read another one, just as we do for types.
llvm-svn: 174745
Douglas Gregor [Fri, 8 Feb 2013 21:27:45 +0000 (21:27 +0000)]
Never cache the result of a module file lookup.
llvm-svn: 174744
Hal Finkel [Fri, 8 Feb 2013 21:13:39 +0000 (21:13 +0000)]
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
Bill Schmidt [Fri, 8 Feb 2013 21:08:22 +0000 (21:08 +0000)]
More modifications to PowerPC doc links
llvm-svn: 174742
Bob Wilson [Fri, 8 Feb 2013 20:35:15 +0000 (20:35 +0000)]
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
Hal Finkel [Fri, 8 Feb 2013 20:24:46 +0000 (20:24 +0000)]
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
Manuel Klimek [Fri, 8 Feb 2013 20:04:33 +0000 (20:04 +0000)]
Adapt test to new clang-format behavior.
llvm-svn: 174738
Manuel Klimek [Fri, 8 Feb 2013 19:53:32 +0000 (19:53 +0000)]
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
Ted Kremenek [Fri, 8 Feb 2013 19:51:43 +0000 (19:51 +0000)]
Teach BugReporter (extensive diagnostics) to emit a diagnostic when a loop body is skipped.
Fixes <rdar://problem/
12322528>.
llvm-svn: 174736
Enrico Granata [Fri, 8 Feb 2013 19:28:04 +0000 (19:28 +0000)]
This checkin implements the data formatter for NSURL in C++ code
llvm-svn: 174735
Argyrios Kyrtzidis [Fri, 8 Feb 2013 19:27:23 +0000 (19:27 +0000)]
[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
Howard Hinnant [Fri, 8 Feb 2013 19:10:36 +0000 (19:10 +0000)]
Michael van der Westhuizen: Update instructions for building on Linux.
llvm-svn: 174733
Howard Hinnant [Fri, 8 Feb 2013 19:08:06 +0000 (19:08 +0000)]
Add Michael van der Westhuizen to CREDITS.TXT
llvm-svn: 174732
Howard Hinnant [Fri, 8 Feb 2013 19:04:53 +0000 (19:04 +0000)]
Michael van der Westhuizen: update to CMake.
llvm-svn: 174731
Ted Kremenek [Fri, 8 Feb 2013 18:59:17 +0000 (18:59 +0000)]
Remove stale instance variable.
llvm-svn: 174730
Fariborz Jahanian [Fri, 8 Feb 2013 18:57:50 +0000 (18:57 +0000)]
objective-C modern translation: Fix another random translation bug
involving property getter expressions on rhs of property setter.
// rdar://
13138459
llvm-svn: 174729
Daniel Dunbar [Fri, 8 Feb 2013 18:26:55 +0000 (18:26 +0000)]
[tests] Another batch of timeout increases.
llvm-svn: 174726
Bill Schmidt [Fri, 8 Feb 2013 18:19:17 +0000 (18:19 +0000)]
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
Chad Rosier [Fri, 8 Feb 2013 18:00:14 +0000 (18:00 +0000)]
[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
Jakob Stoklund Olesen [Fri, 8 Feb 2013 17:43:32 +0000 (17:43 +0000)]
Typos.
llvm-svn: 174723
Daniel Dunbar [Fri, 8 Feb 2013 17:41:28 +0000 (17:41 +0000)]
[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
Daniel Dunbar [Fri, 8 Feb 2013 17:41:19 +0000 (17:41 +0000)]
[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
Manuel Klimek [Fri, 8 Feb 2013 17:38:27 +0000 (17:38 +0000)]
Takes the context into account when re-indenting regions.
Fixes llvm.org/PR14916.
llvm-svn: 174720
Fariborz Jahanian [Fri, 8 Feb 2013 17:15:07 +0000 (17:15 +0000)]
objective-C modern translator. Fixes a trivial
rewriting bug where #ifdef ended up on the same
line as the attribute declaration.
llvm-svn: 174719
Daniel Jasper [Fri, 8 Feb 2013 16:49:27 +0000 (16:49 +0000)]
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
David Tweed [Fri, 8 Feb 2013 16:35:10 +0000 (16:35 +0000)]
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
Daniel Jasper [Fri, 8 Feb 2013 15:28:42 +0000 (15:28 +0000)]
Implement a tiny expression parser to improve formatting decisions.
With this patch, the formatter introduces 'fake' parenthesis according
to the operator precedence of binary operators.
Before:
return aaaa &
AAAAAAAAAAAAAAAAAAAAAAAAAAAAA || bbbb &
BBBBBBBBBBBBBBBBBBBBBBBBBBBBB || cccc &
CCCCCCCCCCCCCCCCCCCCCCCCCC ||
dddd &
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD;
f(
aaaaaaaaaaaaaaaaaaaa &&
aaaaaaaaaaaaaaaaaaaa,
aaaaaaaaaaaaaaaaaaaa &&
aaaaaaaaaaaaaaaaaaaa,
aaaaaaaaaaaaaaaaaaaa &&
aaaaaaaaaaaaaaaaaaaa);
After:
return aaaa &
AAAAAAAAAAAAAAAAAAAAAAAAAAAAA ||
bbbb &
BBBBBBBBBBBBBBBBBBBBBBBBBBBBB ||
cccc &
CCCCCCCCCCCCCCCCCCCCCCCCCC ||
dddd &
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD;
f(
aaaaaaaaaaaaaaaaaaaa &&
aaaaaaaaaaaaaaaaaaaa,
aaaaaaaaaaaaaaaaaaaa &&
aaaaaaaaaaaaaaaaaaaa,
aaaaaaaaaaaaaaaaaaaa &&
aaaaaaaaaaaaaaaaaaaa);
Future improvements:
- Get rid of some of the hacky ways to nicely format certain constructs.
- Merge this parser and the AnnotatingParser as we now have several parsers
that analyze (), [], etc.
llvm-svn: 174714
Arnold Schwaighofer [Fri, 8 Feb 2013 14:50:48 +0000 (14:50 +0000)]
ARM cost model: Address computation in vector mem ops not free
Adds a function to target transform info to query for the cost of address
computation. The cost model analysis pass now also queries this interface.
The code in LoopVectorize adds the cost of address computation as part of the
memory instruction cost calculation. Only there, we know whether the instruction
will be scalarized or not.
Increase the penality for inserting in to D registers on swift. This becomes
necessary because we now always assume that address computation has a cost and
three is a closer value to the architecture.
radar://
13097204
llvm-svn: 174713
Alexey Samsonov [Fri, 8 Feb 2013 14:34:33 +0000 (14:34 +0000)]
Update tests for DWARF parser: store sources next to pre-built object files and provide build instructions
llvm-svn: 174711
Evgeniy Stepanov [Fri, 8 Feb 2013 12:59:42 +0000 (12:59 +0000)]
[asan] Fix off-by-one in AddrIsAtRight.
llvm-svn: 174710
Michael Kuperstein [Fri, 8 Feb 2013 12:58:29 +0000 (12:58 +0000)]
Test Commit
llvm-svn: 174709
Evgeniy Stepanov [Fri, 8 Feb 2013 12:13:43 +0000 (12:13 +0000)]
[sanitizer] Fix lint.
llvm-svn: 174708
Timur Iskhodzhanov [Fri, 8 Feb 2013 12:02:00 +0000 (12:02 +0000)]
[ASan] Switch Windows to allocator v2, also fixing some build errors
llvm-svn: 174707
Timur Iskhodzhanov [Fri, 8 Feb 2013 11:45:04 +0000 (11:45 +0000)]
[ASan] Move functions using BitScan/clzl to sanitizer_common
llvm-svn: 174706
Evgeniy Stepanov [Fri, 8 Feb 2013 11:19:23 +0000 (11:19 +0000)]
[sanitizer] Add 2 random tests for the scanf implementation.
llvm-svn: 174705
Evgeniy Stepanov [Fri, 8 Feb 2013 11:17:20 +0000 (11:17 +0000)]
[sanitizer] Improve scanf interceptor
This a rewrite of the scanf parser. The new implementation is pretty close to
the spec, with a few shortcuts taken here and there. It is conservative, i.e.
it gives up parsing if it does not understand some part of the format string,
or runs into an ambiguous % spec. It does not handle some rarely used parts of
the spec, like %n$ - for now.
I'm also moving parser call to after the original *scanf function completes,
so that we can find out the store size of %s directive by the use of strlen()
on the target buffer.
llvm-svn: 174704
Daniel Jasper [Fri, 8 Feb 2013 08:22:00 +0000 (08:22 +0000)]
Avoid unnecessary line breaks in nested ObjC calls.
Before:
[pboard setData:[NSData dataWithBytes:&button
length:sizeof(button)]
forType:kBookmarkButtonDragType];
After:
[pboard setData:[NSData dataWithBytes:&button length:sizeof(button)]
forType:kBookmarkButtonDragType];
llvm-svn: 174701
Tim Northover [Fri, 8 Feb 2013 08:00:13 +0000 (08:00 +0000)]
Improve filechecking of volatile test.
My previous attempt was extremely deficient, allowing more volatiles
to be introduced and not even checking all of the ones that are
present.
This attempt doesn't try to keep track of the values stored or offsets
within particular objects, just that the correct objects are accessed
in a correctly volatile manner throughout.
llvm-svn: 174700
Alexey Samsonov [Fri, 8 Feb 2013 07:39:25 +0000 (07:39 +0000)]
[CMake] set -mmacosx-version-min to 10.7 if compiler-rt is built with -stdlib=libc++
llvm-svn: 174699
Jordan Rose [Fri, 8 Feb 2013 07:28:25 +0000 (07:28 +0000)]
CMake: Include Clang unit tests in check-clang target in standalone builds.
Also, remove CLANG_BUILD_TESTS option. It won't have consistent behavior
between standalone and non-standalone builds, so I'm not going to bother
hooking it up for standalone builds. LLVM_BUILD_TESTS will continue to
control unit test inclusion in the "all" target in non-standalone builds.
Finally, fix the default value of CLANG_INCLUDE_TESTS, which was being set
to the boolean value of "LLVM_INCLUDE_TESTS", i.e. OFF, rather than actually
reading the variable ${LLVM_INCLUDE_TESTS}! If you picked up my earlier
commit, YOU WILL HAVE TO MANUALLY SET THIS OPTION BACK ON. My apologies!
Part two of r174691 (allow the unit tests to be built in standalone mode).
llvm-svn: 174698
Bill Wendling [Fri, 8 Feb 2013 06:32:06 +0000 (06:32 +0000)]
Parse the attribute group reference on a function.
Attribute references are of this form:
define void @foo() #0 #1 #2 { ... }
Parse them for function attributes. If there's more than one reference, then
they are merged together.
llvm-svn: 174697
Reed Kotler [Fri, 8 Feb 2013 03:57:41 +0000 (03:57 +0000)]
When Mips16 frames grow large, the immediate field may exceed the maximum
allowed size for the instruction. This code uses RegScavenger to fix this.
We sometimes need 2 registers for Mips16 so we must handle things
differently than how register scavenger is normally used.
llvm-svn: 174696
Greg Clayton [Fri, 8 Feb 2013 02:54:24 +0000 (02:54 +0000)]
Added the ability to specify a breakpoint using the GDB '*ADDRESS' format:
(lldb) b *0x1234
You can still of course just specify an address:
(lldb) b 0x1234
Also now we accept the '&' before function names to indicate to not to skip the function prologue like GDB supports. To see how this works:
(lldb) settings set interpreter.expand-regex-aliases 1
(lldb) b &main
breakpoint set --name 'main' --skip-prologue=0
Breakpoint 1: where = a.out`main at main.c:20, address = 0x0000000100000b60
(lldb) b main
breakpoint set --name 'main'
Breakpoint 2: where = a.out`main + 54 at main.c:21, address = 0x0000000100000b96
llvm-svn: 174695
Nick Lewycky [Fri, 8 Feb 2013 02:38:30 +0000 (02:38 +0000)]
Fix test failure by making sure this file isn't identical to any other file
included in the same test. Clang gets confused about whether it's already built
a module for this file, when running on a content-addressible filesystem.
llvm-svn: 174694
Enrico Granata [Fri, 8 Feb 2013 01:55:46 +0000 (01:55 +0000)]
<rdar://problem/
12898191>
Added a summary for NSMutableAttributedString
In the process, converted formatters for other NSString-based classes over to C++ code
llvm-svn: 174693
Andrew Trick [Fri, 8 Feb 2013 01:55:39 +0000 (01:55 +0000)]
Revert "Have InstCombine call SipmlifyCall when handling calls. Test case included."
This reverts commit
3854a5d90fee52af1065edbed34521fff6cdc18d.
This causes a clang unit test to hang: vtable-available-externally.cpp.
llvm-svn: 174692
Jordan Rose [Fri, 8 Feb 2013 01:42:37 +0000 (01:42 +0000)]
CMake: Optionally allow running the Clang unit tests in standalone builds.
The reason this is not enabled by default is because there is no way for
Clang to guarantee that the LLVM unit testing infrastruture has been built.
However, if it /has/ been built, there's no reason why the standalone Clang
build can't use it!
This should have no effect on existing builds -- in a combined build the
value of the CLANG_INCLUDE_TESTS option defaults to the LLVM equivalent,
and in a standalone build it defaults to off.
llvm-svn: 174691
Richard Smith [Fri, 8 Feb 2013 01:35:44 +0000 (01:35 +0000)]
Fix conflict between r174685 and r174645 (rename -fmodule-cache-path <foo> to -fmodules-cache-path=<foo>).
llvm-svn: 174690
Argyrios Kyrtzidis [Fri, 8 Feb 2013 01:12:25 +0000 (01:12 +0000)]
[libclang] Attribute visitation happens out-of-source-order, make sure
we annotate properly when there is an attribute and not skip type specs
if the attribute is after the declaration.
rdar://
13129077
llvm-svn: 174689
Tanya Lattner [Fri, 8 Feb 2013 01:07:32 +0000 (01:07 +0000)]
Use the target address space value when mangling names.
llvm-svn: 174688
Michael J. Spencer [Fri, 8 Feb 2013 01:05:48 +0000 (01:05 +0000)]
[readobj] Fix memory leak.
llvm-svn: 174687
Bill Wendling [Fri, 8 Feb 2013 00:52:31 +0000 (00:52 +0000)]
Use ParseFnAttributeValuePairs instead of ParseOptionalFuncAttrs
The functionality of ParseOptionalFuncAttrs was there in
ParseFnAttributeValuePairs. So just use that instead.
llvm-svn: 174686
Richard Smith [Fri, 8 Feb 2013 00:37:45 +0000 (00:37 +0000)]
Fix stack overflow and improve performance when a module contains many
overloads of a name by claiming that there are no lookup results for that name
in modules while loading the names from the module. Lookups in deserialization
really don't want to find names which they themselves are in the process of
introducing. This also has the pleasant side-effect of automatically caching
PCH lookups which found no names.
The runtime here is still quadratic in the number of overloads, but the
constant is lower.
llvm-svn: 174685
Fariborz Jahanian [Fri, 8 Feb 2013 00:27:34 +0000 (00:27 +0000)]
objective-C modern translator. Generate #line
info in the translated code under -g only.
// rdar://
13138170
llvm-svn: 174684
Douglas Gregor [Fri, 8 Feb 2013 00:10:48 +0000 (00:10 +0000)]
Teach subframework header lookup to suggest modules <rdar://problem/
13176200>.
llvm-svn: 174683
Michael J. Spencer [Thu, 7 Feb 2013 23:37:58 +0000 (23:37 +0000)]
[Object][ELF] Add a way to get the dynamic symbol table section.
llvm-svn: 174682
Michael J. Spencer [Thu, 7 Feb 2013 23:37:46 +0000 (23:37 +0000)]
[Object][ELF] Add {begin,end}_elf_dynamic_symbols to non-virtually iterate over dynamic symbols.
llvm-svn: 174681
Anna Zaks [Thu, 7 Feb 2013 23:29:22 +0000 (23:29 +0000)]
[analyzer] Remove redundant check as per Jordan's feedback.
llvm-svn: 174680
Anna Zaks [Thu, 7 Feb 2013 23:29:20 +0000 (23:29 +0000)]
[analyzer] Fix typo.
llvm-svn: 174679
Anna Zaks [Thu, 7 Feb 2013 23:05:47 +0000 (23:05 +0000)]
[analyzer] Report bugs when freeing memory with offset pointer
The malloc checker will now catch the case when a previously malloc'ed
region is freed, but the pointer passed to free does not point to the
start of the allocated memory. For example:
int *p1 = malloc(sizeof(int));
p1++;
free(p1); // warn
From the "memory.LeakPtrValChanged enhancement to unix.Malloc" entry
in the list of potential checkers.
A patch by Branden Archer!
llvm-svn: 174678
Anna Zaks [Thu, 7 Feb 2013 23:05:43 +0000 (23:05 +0000)]
[analyzer] Add pointer escape type param to checkPointerEscape callback
The checkPointerEscape callback previously did not specify how a
pointer escaped. This change includes an enum which describes the
different ways a pointer may escape. This enum is passed to the
checkPointerEscape callback when a pointer escapes. If the escape
is due to a function call, the call is passed. This changes
previous behavior where the call is passed as NULL if the escape
was due to indirectly invalidating the region the pointer referenced.
A patch by Branden Archer!
llvm-svn: 174677
Anna Zaks [Thu, 7 Feb 2013 23:05:37 +0000 (23:05 +0000)]
[analyzer] Don't reinitialize static globals more than once along a path
This patch makes sure that we do not reinitialize static globals when
the function is called more than once along a path. The motivation is
code with initialization patterns that rely on 2 static variables, where
one of them has an initializer while the other does not. Currently, we
reset the static variables with initializers on every visit to the
function along a path.
llvm-svn: 174676
Michael Ilseman [Thu, 7 Feb 2013 23:01:35 +0000 (23:01 +0000)]
Have InstCombine call SipmlifyCall when handling calls. Test case included.
llvm-svn: 174675
Douglas Gregor [Thu, 7 Feb 2013 22:59:12 +0000 (22:59 +0000)]
Form the default -fmodules-cache-path= properly.
llvm-svn: 174674
Enrico Granata [Thu, 7 Feb 2013 22:57:46 +0000 (22:57 +0000)]
Renaming SBValueList::get() to
opaque_ptr since it returns a void* instead of an usable object.
llvm-svn: 174673
Fariborz Jahanian [Thu, 7 Feb 2013 22:50:40 +0000 (22:50 +0000)]
objective-C modern translator. More fixups for
modern meta-data abi translation. Still wip.
// rdar://
13138459
llvm-svn: 174672
Nadav Rotem [Thu, 7 Feb 2013 22:34:07 +0000 (22:34 +0000)]
fix 80-col violation and fix the docs.
llvm-svn: 174671
Enrico Granata [Thu, 7 Feb 2013 22:22:27 +0000 (22:22 +0000)]
Correct logging for function calls that return SBValueList
llvm-svn: 174670
Marshall Clow [Thu, 7 Feb 2013 22:12:02 +0000 (22:12 +0000)]
Change the 'result_type' from unsigned to 'uint_fast32_t'. This eliminates truncation warnings on Linux
llvm-svn: 174669
Greg Clayton [Thu, 7 Feb 2013 21:49:54 +0000 (21:49 +0000)]
Be sure to set the data offset to zero if we actually mmap the entire ELF file.
llvm-svn: 174668
Daniel Dunbar [Thu, 7 Feb 2013 21:34:34 +0000 (21:34 +0000)]
[lit] Add a display function for lit.Test.TestResult.
llvm-svn: 174667
Akira Hatanaka [Thu, 7 Feb 2013 21:32:32 +0000 (21:32 +0000)]
[mips] Make Filler a class and reduce indentation.
llvm-svn: 174666
Andrew Kaylor [Thu, 7 Feb 2013 21:30:54 +0000 (21:30 +0000)]
Fixing stale pointer problem in ELFObjectFile
llvm-svn: 174665
Eric Christopher [Thu, 7 Feb 2013 21:19:56 +0000 (21:19 +0000)]
Formatting.
llvm-svn: 174664
Eric Christopher [Thu, 7 Feb 2013 21:19:50 +0000 (21:19 +0000)]
"Clean up" line section symbol emission by emitting the section
syms before constructing the compile units so we're not emitting
section references to sections not there already.
llvm-svn: 174663
Daniel Jasper [Thu, 7 Feb 2013 21:08:36 +0000 (21:08 +0000)]
clang-format: Don't put useless space in f( ::g()).
llvm-svn: 174662
Will Schmidt [Thu, 7 Feb 2013 20:43:33 +0000 (20:43 +0000)]
[patch] bug 15055 Add Unistd.h to OProfileWrapper.cpp
Add #include <unistd.h> to OProfileWrapper.cpp. This provides the declarations for 'read' and 'close' that are otherwise missing, and result in 'error: <foo> was not declared in this scope'.
This matches the issue as reported in bug 15055 "Can no longer compile LLVM with --with-oprofile"
llvm-svn: 174661
Bill Schmidt [Thu, 7 Feb 2013 20:33:57 +0000 (20:33 +0000)]
Constrain PowerPC autovectorization to fix bug 15041.
Certain vector operations don't vectorize well with the current
PowerPC implementation. Element insert/extract performs poorly
without VSX support because Altivec requires going through memory.
SREM, UREM, and VSELECT all produce bad scalar code.
There's a lot of work to do for the cost model before
autovectorization will be tuned well, and this is not an attempt to
address the larger problem.
llvm-svn: 174660
Shankar Easwaran [Thu, 7 Feb 2013 20:33:55 +0000 (20:33 +0000)]
fix segment ordering of elf segments
llvm-svn: 174659
Shankar Easwaran [Thu, 7 Feb 2013 20:16:12 +0000 (20:16 +0000)]
add changes for layoutafter/layoutbefore/ingroup/layoutpass and test cases
llvm-svn: 174658
Akira Hatanaka [Thu, 7 Feb 2013 19:48:00 +0000 (19:48 +0000)]
[mips] Add definition of JALR instruction which has two register operands. Change the
original JALR instruction with one register operand to be a pseudo-instruction.
llvm-svn: 174657
Tom Stellard [Thu, 7 Feb 2013 19:39:45 +0000 (19:39 +0000)]
R600/SI: cleanup VGPR encoding
Remove all the unused code.
Patch by: Christian König
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 174656