Michael Ilseman [Wed, 12 Dec 2012 20:59:36 +0000 (20:59 +0000)]
Restore the PHI optimization I accidently removed
llvm-svn: 170024
Jakub Staszak [Wed, 12 Dec 2012 20:58:42 +0000 (20:58 +0000)]
unHECKify test fixed by Jacob in r159003.
llvm-svn: 170023
Michael Ilseman [Wed, 12 Dec 2012 20:57:53 +0000 (20:57 +0000)]
Remove trailing whitespace
llvm-svn: 170022
Benjamin Kramer [Wed, 12 Dec 2012 20:55:44 +0000 (20:55 +0000)]
Fix the build on case sensitive file systems.
llvm-svn: 170021
David Majnemer [Wed, 12 Dec 2012 20:48:54 +0000 (20:48 +0000)]
Simplify negated bit test
llvm-svn: 170020
Nick Kledzik [Wed, 12 Dec 2012 20:46:15 +0000 (20:46 +0000)]
Initial implementation of a utility for converting native data
structures to and from YAML using traits. The first client will
be the test suite of lld. The documentation will show up at:
http://llvm.org/docs/YamlIO.html
llvm-svn: 170019
Evan Cheng [Wed, 12 Dec 2012 20:43:23 +0000 (20:43 +0000)]
Fix a logic bug in inline expansion of memcpy / memset with an overlapping
load / store pair. It's not legal to use a wider load than the size of
the remaining bytes if it's the first pair of load / store.
llvm-svn: 170018
Jakub Staszak [Wed, 12 Dec 2012 20:43:00 +0000 (20:43 +0000)]
unHECKify test. It was fixed by Chris in 2009.
llvm-svn: 170017
Bill Schmidt [Wed, 12 Dec 2012 20:29:20 +0000 (20:29 +0000)]
The ordering of two relocations on the same instruction is apparently not
predictable when compiled on at least one non-PowerPC host. Source of
nondeterminism not apparent. Restrict the test to build on PowerPC hosts
for now while looking into the issue further.
llvm-svn: 170016
Jakub Staszak [Wed, 12 Dec 2012 20:29:06 +0000 (20:29 +0000)]
Fix typo in test-case.
llvm-svn: 170015
Jim Ingham [Wed, 12 Dec 2012 20:23:52 +0000 (20:23 +0000)]
Added a warning about using the lldb.target, etc. for anything other than convenience when using the
script command.
llvm-svn: 170014
Enrico Granata [Wed, 12 Dec 2012 20:11:05 +0000 (20:11 +0000)]
<rdar://problem/
10898363>
Emitting a warning when defining a summary or a synthetic provider and the function/class name provided does not correspond to a valid scripting object
Also using this chance to edit a few error messages from weird "internal error" markers to actual user-legible data!
llvm-svn: 170013
Akira Hatanaka [Wed, 12 Dec 2012 20:09:58 +0000 (20:09 +0000)]
[mips] Fix a memory leak bug report by NAKAMURA Takumi.
llvm-svn: 170012
Dmitri Gribenko [Wed, 12 Dec 2012 20:07:18 +0000 (20:07 +0000)]
Documentation: SphinxQuickstartTemplate.rst: add guidelines about highlighting
console sessions and add more highlighter names.
llvm-svn: 170011
Chad Rosier [Wed, 12 Dec 2012 20:06:31 +0000 (20:06 +0000)]
[driver] Don't warn about an unused -flto option.
rdar://
12851905
llvm-svn: 170010
Jim Ingham [Wed, 12 Dec 2012 19:58:40 +0000 (19:58 +0000)]
Fixed a few bugs in the "step in" thread plan logic.
Added a "step-in-target" flag to "thread step-in" so if you have something like:
Process 28464 stopped
* thread #1: tid = 0x1c03, function: main , stop reason = breakpoint 1.1
frame #0: 0x0000000100000e08 a.out`main at main.c:62
61
-> 62 int A6 = complex (a(4), b(5), c(6)); // Stop here to step targetting b and hitting breakpoint.
63
and you want to get into "complex" skipping a, b and c, you can do:
(lldb) step -t complex
Process 28464 stopped
* thread #1: tid = 0x1c03, function: complex , stop reason = step in
frame #0: 0x0000000100000d0d a.out`complex at main.c:44
41
42 int complex (int first, int second, int third)
43 {
-> 44 return first + second + third; // Step in targetting complex should stop here
45 }
46
47 int main (int argc, char const *argv[])
llvm-svn: 170008
Eli Bendersky [Wed, 12 Dec 2012 19:54:05 +0000 (19:54 +0000)]
Make naming consistent, add comments and sanity asserts
llvm-svn: 170007
Jakub Staszak [Wed, 12 Dec 2012 19:47:04 +0000 (19:47 +0000)]
Fix typo.
llvm-svn: 170006
Nadav Rotem [Wed, 12 Dec 2012 19:39:36 +0000 (19:39 +0000)]
Fix indentation.
llvm-svn: 170005
Nadav Rotem [Wed, 12 Dec 2012 19:29:45 +0000 (19:29 +0000)]
LoopVectorizer: Use the "optsize" attribute to decide if we are allowed to increase the function size.
llvm-svn: 170004
Bill Schmidt [Wed, 12 Dec 2012 19:29:35 +0000 (19:29 +0000)]
This patch implements local-dynamic TLS model support for the 64-bit
PowerPC target. This is the last of the four models, so we now have
full TLS support.
This is mostly a straightforward extension of the general dynamic model.
I had to use an additional Chain operand to tie ADDIS_DTPREL_HA to the
register copy following ADDI_TLSLD_L; otherwise everything above the
ADDIS_DTPREL_HA appeared dead and was removed.
As before, there are new test cases to test the assembly generation, and
the relocations output during integrated assembly. The expected code
gen sequence can be read in test/CodeGen/PowerPC/tls-ld.ll.
There are a couple of things I think can be done more efficiently in the
overall TLS code, so there will likely be a clean-up patch forthcoming;
but for now I want to be sure the functionality is in place.
Bill
llvm-svn: 170003
Bill Wendling [Wed, 12 Dec 2012 19:21:53 +0000 (19:21 +0000)]
Kerning.
llvm-svn: 170002
Dmitri Gribenko [Wed, 12 Dec 2012 19:15:53 +0000 (19:15 +0000)]
Documentation: llvm-bcanalyzer.rst: cleanup.
llvm-svn: 170001
Jordan Rose [Wed, 12 Dec 2012 19:13:44 +0000 (19:13 +0000)]
[analyzer] Don't crash running destructors for multidimensional arrays.
We don't handle array destructors correctly yet, but we now apply the same
hack (explicitly destroy the first element, implicitly invalidate the rest)
for multidimensional arrays that we already use for linear arrays.
<rdar://problem/
12858542>
llvm-svn: 170000
Sean Callanan [Wed, 12 Dec 2012 18:02:47 +0000 (18:02 +0000)]
Minor grammar and style fixes in documentation.
<rdar://problem/
12861963>
<rdar://problem/
12861904>
llvm-svn: 169997
Chad Rosier [Wed, 12 Dec 2012 17:52:21 +0000 (17:52 +0000)]
Marking the objc_autoreleaseReturnValue and objc_retainAutoreleaseReturnValue
call sites as tail calls unconditionally. While it's theoretically true that
this is just an optimization, it's an optimization that we very much want to
happen even at -O0, or else ARC applications become substantially harder to
debug. See r169796 for the llvm/fast-isel side of things.
rdar://
12553082
llvm-svn: 169996
Greg Clayton [Wed, 12 Dec 2012 17:30:52 +0000 (17:30 +0000)]
Allow LLDB to work with dSYM files that have a DWARF compile unit with nothing else to support clang's new -gline-tables-only mode of compiling.
llvm-svn: 169994
Dmitri Gribenko [Wed, 12 Dec 2012 17:03:50 +0000 (17:03 +0000)]
Documentation: AliasAnalysis.rst: improve internal and external links
llvm-svn: 169993
Dmitri Gribenko [Wed, 12 Dec 2012 17:02:44 +0000 (17:02 +0000)]
Documentation: convert WritingAnLLVMPass.html to reST.
Patch by Anthony Mykhailenko with small fixes by me.
llvm-svn: 169992
Dmitri Gribenko [Wed, 12 Dec 2012 16:58:13 +0000 (16:58 +0000)]
Documentation: cleanup
llvm-svn: 169990
Rafael Espindola [Wed, 12 Dec 2012 16:52:40 +0000 (16:52 +0000)]
The TargetData is not used for the isPowerOfTwo determination. It has never
been used in the first place. It simply was passed to the function and to the
recursive invocations. Simply drop the parameter and update the callers for the
new signature.
Patch by Saleem Abdulrasool!
llvm-svn: 169988
Alexander Potapenko [Wed, 12 Dec 2012 16:10:46 +0000 (16:10 +0000)]
[ASan] Fix test expectations for strcat/strncat.
llvm-svn: 169987
Edwin Vane [Wed, 12 Dec 2012 16:08:10 +0000 (16:08 +0000)]
Add cpp11-migrate to autoconf build
llvm-svn: 169986
Kostya Serebryany [Wed, 12 Dec 2012 14:32:18 +0000 (14:32 +0000)]
[sanitizer] add OnMap/OnUmap callbacks to the allocator interface
llvm-svn: 169985
Alexey Samsonov [Wed, 12 Dec 2012 14:31:53 +0000 (14:31 +0000)]
Improve debug info generated with enabled AddressSanitizer.
When ASan replaces <alloca instruction> with
<offset into a common large alloca>, it should also patch
llvm.dbg.declare calls and replace debug info descriptors to mark
that we've replaced alloca with a value that stores an address
of the user variable, not the user variable itself.
See PR11818 for more context.
llvm-svn: 169984
Edwin Vane [Wed, 12 Dec 2012 14:30:57 +0000 (14:30 +0000)]
Initial commit for cpp11-migrate tool
- Added directory structures and build system files for the new tool.
- Extremely basic implementation of tool performs only an initial syntax check.
- Basic tests ensure syntax test works as expected.
llvm-svn: 169983
Kostya Serebryany [Wed, 12 Dec 2012 14:26:06 +0000 (14:26 +0000)]
[tsan] fix cmake build
llvm-svn: 169982
Dmitri Gribenko [Wed, 12 Dec 2012 14:23:14 +0000 (14:23 +0000)]
Documentation: use a 'console' highlighter for terminal output examples. This
gives a nicer output than 'bash'.
llvm-svn: 169981
Benjamin Kramer [Wed, 12 Dec 2012 14:17:17 +0000 (14:17 +0000)]
PR14581: Make SourceLocation::printToString work, or it will always return an empty string.
No test case, this is debugging code.
llvm-svn: 169980
Dmitri Gribenko [Wed, 12 Dec 2012 13:56:37 +0000 (13:56 +0000)]
Documentation: use a 'console' highlighter for terminal output examples. This
gives a nicer output than 'bash'.
llvm-svn: 169979
NAKAMURA Takumi [Wed, 12 Dec 2012 13:34:20 +0000 (13:34 +0000)]
llvm/test/CodeGen/X86/atom-bypass-slow-division.ll: Fix possible typo(s) in CHECK-NOT lines.
Found by Alexander Zinenko, thanks!
llvm-svn: 169978
NAKAMURA Takumi [Wed, 12 Dec 2012 13:34:14 +0000 (13:34 +0000)]
llvm/test/CodeGen/X86/atom-bypass-slow-division.ll: Rename symbols, s/test_/Test/g, not to mismatch "CHECK(-NOT): test".
llvm-svn: 169977
Manuel Klimek [Wed, 12 Dec 2012 13:26:54 +0000 (13:26 +0000)]
Speeds up parsing of global declarations in cases where the warning
is switched of by about 0.8% (tested with int i<N>).
Additionally, this puts computing the diagnostic class into the hot
path more when parsing, in preparation for upcoming optimizations
in this area.
llvm-svn: 169976
Dmitry Vyukov [Wed, 12 Dec 2012 13:11:44 +0000 (13:11 +0000)]
tsan: explain why pthread_cond_init() interceptor is commented out
llvm-svn: 169975
Alexander Potapenko [Wed, 12 Dec 2012 12:59:47 +0000 (12:59 +0000)]
[ASan] Enhance OOB tests to check for access type (read or write).
llvm-svn: 169974
Dmitry Vyukov [Wed, 12 Dec 2012 12:45:07 +0000 (12:45 +0000)]
tsan: add comment to tsan_fd.h file
llvm-svn: 169973
Alexander Potapenko [Wed, 12 Dec 2012 12:32:57 +0000 (12:32 +0000)]
[ASan] Fixed a compiler warning.
llvm-svn: 169972
Dmitry Vyukov [Wed, 12 Dec 2012 12:27:00 +0000 (12:27 +0000)]
tsan: add missing files
llvm-svn: 169971
Dmitry Vyukov [Wed, 12 Dec 2012 11:59:30 +0000 (11:59 +0000)]
tsan: more precise handling of IO synchronization
llvm-svn: 169970
Alexander Potapenko [Wed, 12 Dec 2012 11:52:26 +0000 (11:52 +0000)]
[ASan] fix compilation on Mac.
llvm-svn: 169969
Kostya Serebryany [Wed, 12 Dec 2012 11:37:23 +0000 (11:37 +0000)]
[asan] fix android build and lint
llvm-svn: 169968
Evgeniy Stepanov [Wed, 12 Dec 2012 10:50:48 +0000 (10:50 +0000)]
[msan] Remove an extra semicolon.
llvm-svn: 169967
Kostya Serebryany [Wed, 12 Dec 2012 09:54:35 +0000 (09:54 +0000)]
[asan] add sanitizer_common/sanitizer_common_interceptors.h with pread/pread64/read interceptors. Use it in asan. Add asan tests for pread/etc. Add FIXME to tsan/msan interceptors
llvm-svn: 169966
Logan Chien [Wed, 12 Dec 2012 07:14:46 +0000 (07:14 +0000)]
Add ARM NONE and PREL31 relocation types.
Add R_ARM_NONE and R_ARM_PREL31 relocation types
to MCExpr. Both of them will be used while
generating .ARM.extab and .ARM.exidx sections.
llvm-svn: 169965
NAKAMURA Takumi [Wed, 12 Dec 2012 06:22:22 +0000 (06:22 +0000)]
clang/lib/Driver/Driver.cpp: Split COMPILER_PATH according to llvm::sys::PathSeparator, that is ';' in Win32 hosts.
Thanks to Bogon Kim!
llvm-svn: 169964
Rafael Espindola [Wed, 12 Dec 2012 06:18:15 +0000 (06:18 +0000)]
Remove some dead code.
llvm-svn: 169963
NAKAMURA Takumi [Wed, 12 Dec 2012 03:34:26 +0000 (03:34 +0000)]
[CMake] Fixup R600.
llvm-svn: 169962
Enrico Granata [Wed, 12 Dec 2012 03:23:37 +0000 (03:23 +0000)]
Option changes:
the option to print the runtime-specific description has been modified in the frame variable, memory read and expression command.
All three commands now support a --object-description option, with a shortcut of -O (uppercase letter o)
This is a breaking change:
frame variable used --objc as the long option name
expression used -o as a shortcut
memory read uses --objd as the long option name
Hopefully, most users won't be affected by the change since people tend to access "expression --object-description" under the alias "po" which still works
The test suite has been tweaked accordingly.
llvm-svn: 169961
Richard Smith [Wed, 12 Dec 2012 02:46:14 +0000 (02:46 +0000)]
Don't warn about disabled macro expansion if we see the name of a function-like macro which isn't immediately followed by '('. FreeBSD's stdio.h #defines foo(x) to (foo)(x), apparently.
llvm-svn: 169960
Evan Cheng [Wed, 12 Dec 2012 02:34:41 +0000 (02:34 +0000)]
Sorry about the churn. One more change to getOptimalMemOpType() hook. Did I
mention the inline memcpy / memset expansion code is a mess?
This patch split the ZeroOrLdSrc argument into two: IsMemset and ZeroMemset.
The first indicates whether it is expanding a memset or a memcpy / memmove.
The later is whether the memset is a memset of zero. It's totally possible
(likely even) that targets may want to do different things for memcpy and
memset of zero.
llvm-svn: 169959
Jason Molenda [Wed, 12 Dec 2012 02:23:56 +0000 (02:23 +0000)]
Add a LOG_TARGET log to Target::SetDefaultArchitecture
to track any architecture setting there.
llvm-svn: 169958
NAKAMURA Takumi [Wed, 12 Dec 2012 01:41:01 +0000 (01:41 +0000)]
llvm/test/CodeGen/X86/store_op_load_fold.ll: Fix typo, s/CHECK_NEXT/CHECK-NEXT/
llvm-svn: 169957
NAKAMURA Takumi [Wed, 12 Dec 2012 01:40:56 +0000 (01:40 +0000)]
llvm/test/CodeGen/X86/store_op_load_fold.ll: Add explicit triple.
llvm-svn: 169956
Nadav Rotem [Wed, 12 Dec 2012 01:33:47 +0000 (01:33 +0000)]
Fix the ascii drawing that was ruined when I split the H and CPP
llvm-svn: 169955
Evan Cheng [Wed, 12 Dec 2012 01:32:07 +0000 (01:32 +0000)]
- Rename isLegalMemOpType to isSafeMemOpType. "Legal" is a very overloade term.
Also added more comments to explain why it is generally ok to return true.
- Rename getOptimalMemOpType argument IsZeroVal to ZeroOrLdSrc. It's meant to
be true for loaded source (memcpy) or zero constants (memset). The poor name
choice is probably some kind of legacy issue.
llvm-svn: 169954
Nadav Rotem [Wed, 12 Dec 2012 01:31:10 +0000 (01:31 +0000)]
fix a typo.
llvm-svn: 169953
Greg Clayton [Wed, 12 Dec 2012 01:15:30 +0000 (01:15 +0000)]
<rdar://problem/
12780507>
Fix add-dsym ("target symbols add") to correctly add a dSYM file when the target arch doesn't match the arch of the module.
llvm-svn: 169952
Manman Ren [Wed, 12 Dec 2012 01:13:50 +0000 (01:13 +0000)]
DAGCombine: clamp hi bit in APInt::getBitsSet to avoid assertion
rdar://
12838504
llvm-svn: 169951
Nadav Rotem [Wed, 12 Dec 2012 01:11:46 +0000 (01:11 +0000)]
LoopVectorizer: When -Os is used, vectorize only loops that dont require a tail loop. There is no testcase because I dont know of a way to initialize the loop vectorizer pass without adding an additional hidden flag.
llvm-svn: 169950
Argyrios Kyrtzidis [Wed, 12 Dec 2012 01:05:25 +0000 (01:05 +0000)]
[libclang] Make sure tokens from preprocessor directives are annotated as such,
even if the directive is inside a declaration.
Fixes rdar://
11548788 & http://llvm.org/PR12970
llvm-svn: 169949
Richard Trieu [Wed, 12 Dec 2012 00:52:15 +0000 (00:52 +0000)]
Fix line ending is tests. No functional change.
llvm-svn: 169947
NAKAMURA Takumi [Wed, 12 Dec 2012 00:51:38 +0000 (00:51 +0000)]
clang/test: Suppress two tests on win32 for now, since, not sure, in r169829 to r169831.
"ansi-escape-sequences" is easy convenient to exclude win32. Please be patient.
llvm-svn: 169945
Evan Cheng [Wed, 12 Dec 2012 00:42:09 +0000 (00:42 +0000)]
Avoid using lossy load / stores for memcpy / memset expansion. e.g.
f64 load / store on non-SSE2 x86 targets.
llvm-svn: 169944
Michael Ilseman [Wed, 12 Dec 2012 00:29:16 +0000 (00:29 +0000)]
Have SimplifyBinOp call the new FAdd/FSub/FMul helpers, with fast-math flags off
llvm-svn: 169943
Shuxin Yang [Wed, 12 Dec 2012 00:29:03 +0000 (00:29 +0000)]
- Fix a problematic way in creating all-the-1 APInt.
- Propagate "exact" bit of [l|a]shr instruction.
llvm-svn: 169942
Michael Ilseman [Wed, 12 Dec 2012 00:28:32 +0000 (00:28 +0000)]
Remove redunant optimizations from InstCombine, instead call the appropriate functions from SimplifyInstruction
llvm-svn: 169941
Michael Ilseman [Wed, 12 Dec 2012 00:27:46 +0000 (00:27 +0000)]
Added a slew of SimplifyInstruction floating-point optimizations, many of which take advantage of fast-math flags. Test cases included.
fsub X, +0 ==> X
fsub X, -0 ==> X, when we know X is not -0
fsub +/-0.0, (fsub -0.0, X) ==> X
fsub nsz +/-0.0, (fsub +/-0.0, X) ==> X
fsub nnan ninf X, X ==> 0.0
fadd nsz X, 0 ==> X
fadd [nnan ninf] X, (fsub [nnan ninf] 0, X) ==> 0
where nnan and ninf have to occur at least once somewhere in this expression
fmul X, 1.0 ==> X
llvm-svn: 169940
Michael Ilseman [Wed, 12 Dec 2012 00:23:43 +0000 (00:23 +0000)]
Pattern matchers for floating point values
m_ConstantFP - match and bind a float constant
m_SpecificConstantFP - match a specific floating point value or vector of floats of that value
m_FPOne - match a floating point 1.0 or vector of 1.0s
m_NegZero - match -0.0
m_AnyZero - match 0 or -0.0
llvm-svn: 169939
Michael Ilseman [Wed, 12 Dec 2012 00:21:43 +0000 (00:21 +0000)]
Remove FIXMEs surrounding Constant[Data]Vectors, instead
llvm-svn: 169938
Jim Grosbach [Tue, 11 Dec 2012 23:39:51 +0000 (23:39 +0000)]
Trim unneeded header #include.
llvm-svn: 169933
Dmitri Gribenko [Tue, 11 Dec 2012 23:35:23 +0000 (23:35 +0000)]
Documentation: cleanup: remove useless anchors and write :ref:s explicitly.
llvm-svn: 169932
Jim Grosbach [Tue, 11 Dec 2012 23:31:12 +0000 (23:31 +0000)]
ARM: Remove old testing option.
Pre-regalloc frame allocation and referencing has been on by default
for ages. No need for the testing option that disables it.
llvm-svn: 169931
Jim Grosbach [Tue, 11 Dec 2012 23:31:10 +0000 (23:31 +0000)]
ARM: Remove old testing options.
Base pointer referencing has been enabled for ages.
llvm-svn: 169930
Evan Cheng [Tue, 11 Dec 2012 23:26:14 +0000 (23:26 +0000)]
Replace TargetLowering::isIntImmLegal() with
ScalarTargetTransformInfo::getIntImmCost() instead. "Legal" is a poorly defined
term for something like integer immediate materialization. It is always possible
to materialize an integer immediate. Whether to use it for memcpy expansion is
more a "cost" conceern.
llvm-svn: 169929
Dmitri Gribenko [Tue, 11 Dec 2012 23:13:23 +0000 (23:13 +0000)]
Documentation: Lexicon.rst: add 'SLP' acronym
llvm-svn: 169928
Enrico Granata [Tue, 11 Dec 2012 22:42:19 +0000 (22:42 +0000)]
Adding a validation callback mechanism to OptionValueString (such a feature might theoretically be added to the general OptionValue base class should the need arise)
Using this mechanism, making sure that the options to pass a summary string or a named summary to frame variable do not have invalid values
<rdar://problem/
11576143>
llvm-svn: 169927
Sean Callanan [Tue, 11 Dec 2012 22:39:36 +0000 (22:39 +0000)]
Fixed the IRInterpreter's handling of "this" and
"self" when those pointers are in registers.
Previously in this case the IRInterpreter would
handle them just as if the user had typed in
"$rdi", which isn't safe because $rdi is passed
in through the argument struct.
Now we correctly break out all three cases (i.e.,
normal variables in registers, $reg, and this/self),
and handle them in a way that's a little bit easier
to read and change.
This results in more accurate printing of "this" and
"self" pointers all around. I have strengthened the
optimized-code test case for Objective-C to ensure
that we catch regressions in this area reliably in
the future.
<rdar://problem/
12693963>
llvm-svn: 169924
Douglas Gregor [Tue, 11 Dec 2012 22:31:46 +0000 (22:31 +0000)]
Try to fix Win32 failures
llvm-svn: 169923
Douglas Gregor [Tue, 11 Dec 2012 22:25:26 +0000 (22:25 +0000)]
Don't use 'touch' in this test; it may be the cause of Windows-related failures.
llvm-svn: 169922
Douglas Gregor [Tue, 11 Dec 2012 22:11:52 +0000 (22:11 +0000)]
Use @import rather than @__experimental_modules_import, since the
latter is rather a mess to type.
llvm-svn: 169919
Guy Benyei [Tue, 11 Dec 2012 21:38:14 +0000 (21:38 +0000)]
Add SPIR32/SPIR64 targets to Clang
llvm-svn: 169917
Nadav Rotem [Tue, 11 Dec 2012 21:30:14 +0000 (21:30 +0000)]
PR14574. Fix a bug in the code that calculates the mask the converted PHIs in if-conversion.
llvm-svn: 169916
Tom Stellard [Tue, 11 Dec 2012 21:25:42 +0000 (21:25 +0000)]
Add R600 backend
A new backend supporting AMD GPUs: Radeon HD2XXX - HD7XXX
llvm-svn: 169915
Bill Schmidt [Tue, 11 Dec 2012 20:30:11 +0000 (20:30 +0000)]
This patch implements the general dynamic TLS model for 64-bit PowerPC.
Given a thread-local symbol x with global-dynamic access, the generated
code to obtain x's address is:
Instruction Relocation Symbol
addis ra,r2,x@got@tlsgd@ha R_PPC64_GOT_TLSGD16_HA x
addi r3,ra,x@got@tlsgd@l R_PPC64_GOT_TLSGD16_L x
bl __tls_get_addr(x@tlsgd) R_PPC64_TLSGD x
R_PPC64_REL24 __tls_get_addr
nop
<use address in r3>
The implementation borrows from the medium code model work for introducing
special forms of ADDIS and ADDI into the DAG representation. This is made
slightly more complicated by having to introduce a call to the external
function __tls_get_addr. Using the full call machinery is overkill and,
more importantly, makes it difficult to add a special relocation. So I've
introduced another opcode GET_TLS_ADDR to represent the function call, and
surrounded it with register copies to set up the parameter and return value.
Most of the code is pretty straightforward. I ran into one peculiarity
when I introduced a new PPC opcode BL8_NOP_ELF_TLSGD, which is just like
BL8_NOP_ELF except that it takes another parameter to represent the symbol
("x" above) that requires a relocation on the call. Something in the
TblGen machinery causes BL8_NOP_ELF and BL8_NOP_ELF_TLSGD to be treated
identically during the emit phase, so this second operand was never
visited to generate relocations. This is the reason for the slightly
messy workaround in PPCMCCodeEmitter.cpp:getDirectBrEncoding().
Two new tests are included to demonstrate correct external assembly and
correct generation of relocations using the integrated assembler.
Comments welcome!
Thanks,
Bill
llvm-svn: 169910
Hal Finkel [Tue, 11 Dec 2012 19:59:32 +0000 (19:59 +0000)]
Add -fslp-vectorize to enable bb-vectorize
Add -fslp-vectorize (with -ftree-slp-vectorize as an alias for gcc compatibility)
to provide a way to enable the basic-block vectorization pass. This uses the same
acronym as gcc, superword-level parallelism (SLP), also common in the literature,
to refer to basic-block vectorization.
Nadav suggested this as a follow-up to the adding of -fvectorize.
llvm-svn: 169909
Fariborz Jahanian [Tue, 11 Dec 2012 19:58:01 +0000 (19:58 +0000)]
objective-C blocks: Check for record type when deciding if
byref variable requires extended layout info. to prevent
a crash involving arrays declared __block. // rdar://
12787751
llvm-svn: 169908
Eric Christopher [Tue, 11 Dec 2012 19:42:09 +0000 (19:42 +0000)]
Update some comments.
llvm-svn: 169907
Nadav Rotem [Tue, 11 Dec 2012 18:58:10 +0000 (18:58 +0000)]
Loop Vectorize: optimize the vectorization of trunc(induction_var). The truncation is now done on scalars.
llvm-svn: 169904
Douglas Gregor [Tue, 11 Dec 2012 18:53:07 +0000 (18:53 +0000)]
Don't complain about incomplete implementations for methods that are
unavailable due to availability attributes. <rdar://problem/
12798237>
llvm-svn: 169903
Benjamin Kramer [Tue, 11 Dec 2012 18:00:22 +0000 (18:00 +0000)]
Speed up looking up static diagnostic infos.
Instead of doing a binary search over the whole diagnostic table (which weighs
a whopping 48k on x86_64), use the existing enums to compute the index in the
table. This avoids loading any unneeded data from the table and avoids littering
CPU caches with it. This code is in a hot path for code with many diagnostics.
1% speedup on -fsyntax-only gcc.c, which emits a lot of warnings.
llvm-svn: 169890