Commit Graph

138875 Commits

Author SHA1 Message Date
Alexander Potapenko d27e4861bf [ASan] Fix test expectations for strcat/strncat.
llvm-svn: 169987
2012-12-12 16:10:46 +00:00
Edwin Vane 3d97cc4c57 Add cpp11-migrate to autoconf build
llvm-svn: 169986
2012-12-12 16:08:10 +00:00
Kostya Serebryany e29883c10a [sanitizer] add OnMap/OnUmap callbacks to the allocator interface
llvm-svn: 169985
2012-12-12 14:32:18 +00:00
Alexey Samsonov 3d43b63a6e 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
2012-12-12 14:31:53 +00:00
Edwin Vane 9bd2e1bacc 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
2012-12-12 14:30:57 +00:00
Kostya Serebryany c219f6c777 [tsan] fix cmake build
llvm-svn: 169982
2012-12-12 14:26:06 +00:00
Dmitri Gribenko 99e8b43498 Documentation: use a 'console' highlighter for terminal output examples. This
gives a nicer output than 'bash'.

llvm-svn: 169981
2012-12-12 14:23:14 +00:00
Benjamin Kramer adaf795fc9 PR14581: Make SourceLocation::printToString work, or it will always return an empty string.
No test case, this is debugging code.

llvm-svn: 169980
2012-12-12 14:17:17 +00:00
Dmitri Gribenko 125939cbf7 Documentation: use a 'console' highlighter for terminal output examples. This
gives a nicer output than 'bash'.

llvm-svn: 169979
2012-12-12 13:56:37 +00:00
NAKAMURA Takumi be230b8fdb 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
2012-12-12 13:34:20 +00:00
NAKAMURA Takumi cae5321a3b llvm/test/CodeGen/X86/atom-bypass-slow-division.ll: Rename symbols, s/test_/Test/g, not to mismatch "CHECK(-NOT): test".
llvm-svn: 169977
2012-12-12 13:34:14 +00:00
Manuel Klimek 5704e4e91c 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
2012-12-12 13:26:54 +00:00
Dmitry Vyukov 7d95323047 tsan: explain why pthread_cond_init() interceptor is commented out
llvm-svn: 169975
2012-12-12 13:11:44 +00:00
Alexander Potapenko dab1a61011 [ASan] Enhance OOB tests to check for access type (read or write).
llvm-svn: 169974
2012-12-12 12:59:47 +00:00
Dmitry Vyukov 9ba0f3d51c tsan: add comment to tsan_fd.h file
llvm-svn: 169973
2012-12-12 12:45:07 +00:00
Alexander Potapenko 602a09fa52 [ASan] Fixed a compiler warning.
llvm-svn: 169972
2012-12-12 12:32:57 +00:00
Dmitry Vyukov 9190a036d7 tsan: add missing files
llvm-svn: 169971
2012-12-12 12:27:00 +00:00
Dmitry Vyukov 60c14ce625 tsan: more precise handling of IO synchronization
llvm-svn: 169970
2012-12-12 11:59:30 +00:00
Alexander Potapenko ada2fbd2d4 [ASan] fix compilation on Mac.
llvm-svn: 169969
2012-12-12 11:52:26 +00:00
Kostya Serebryany 28a32c89e9 [asan] fix android build and lint
llvm-svn: 169968
2012-12-12 11:37:23 +00:00
Evgeniy Stepanov 4e772db66a [msan] Remove an extra semicolon.
llvm-svn: 169967
2012-12-12 10:50:48 +00:00
Kostya Serebryany 9a58d399c7 [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
2012-12-12 09:54:35 +00:00
Logan Chien 4dd14fb5eb 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
2012-12-12 07:14:46 +00:00
NAKAMURA Takumi ad80c5ef76 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
2012-12-12 06:22:22 +00:00
Rafael Espindola 07cc84876e Remove some dead code.
llvm-svn: 169963
2012-12-12 06:18:15 +00:00
NAKAMURA Takumi 85292a1338 [CMake] Fixup R600.
llvm-svn: 169962
2012-12-12 03:34:26 +00:00
Enrico Granata 7b8c513f08 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
2012-12-12 03:23:37 +00:00
Richard Smith 181879c293 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
2012-12-12 02:46:14 +00:00
Evan Cheng 962711ee71 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
2012-12-12 02:34:41 +00:00
Jason Molenda a3f24b3cec Add a LOG_TARGET log to Target::SetDefaultArchitecture
to track any architecture setting there.

llvm-svn: 169958
2012-12-12 02:23:56 +00:00
NAKAMURA Takumi 69d1405e48 llvm/test/CodeGen/X86/store_op_load_fold.ll: Fix typo, s/CHECK_NEXT/CHECK-NEXT/
llvm-svn: 169957
2012-12-12 01:41:01 +00:00
NAKAMURA Takumi 01ac65af00 llvm/test/CodeGen/X86/store_op_load_fold.ll: Add explicit triple.
llvm-svn: 169956
2012-12-12 01:40:56 +00:00
Nadav Rotem 6798a04b15 Fix the ascii drawing that was ruined when I split the H and CPP
llvm-svn: 169955
2012-12-12 01:33:47 +00:00
Evan Cheng c3d1aca657 - 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
2012-12-12 01:32:07 +00:00
Nadav Rotem 4fa2e3d5af fix a typo.
llvm-svn: 169953
2012-12-12 01:31:10 +00:00
Greg Clayton 89deb06bbb <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
2012-12-12 01:15:30 +00:00
Manman Ren 82751a105c DAGCombine: clamp hi bit in APInt::getBitsSet to avoid assertion
rdar://12838504

llvm-svn: 169951
2012-12-12 01:13:50 +00:00
Nadav Rotem aeb17df802 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
2012-12-12 01:11:46 +00:00
Argyrios Kyrtzidis 12023e1ec3 [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
2012-12-12 01:05:25 +00:00
Richard Trieu 29a2ffc7aa Fix line ending is tests. No functional change.
llvm-svn: 169947
2012-12-12 00:52:15 +00:00
NAKAMURA Takumi e981508811 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
2012-12-12 00:51:38 +00:00
Evan Cheng 04e5518783 Avoid using lossy load / stores for memcpy / memset expansion. e.g.
f64 load / store on non-SSE2 x86 targets.

llvm-svn: 169944
2012-12-12 00:42:09 +00:00
Michael Ilseman d2b05e59b5 Have SimplifyBinOp call the new FAdd/FSub/FMul helpers, with fast-math flags off
llvm-svn: 169943
2012-12-12 00:29:16 +00:00
Shuxin Yang 81b3678564 - Fix a problematic way in creating all-the-1 APInt.
- Propagate "exact" bit of [l|a]shr instruction.

llvm-svn: 169942
2012-12-12 00:29:03 +00:00
Michael Ilseman d5787be5ba Remove redunant optimizations from InstCombine, instead call the appropriate functions from SimplifyInstruction
llvm-svn: 169941
2012-12-12 00:28:32 +00:00
Michael Ilseman bb6f691b01 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
2012-12-12 00:27:46 +00:00
Michael Ilseman 5cd69b4ce3 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
2012-12-12 00:23:43 +00:00
Michael Ilseman d9d61793e6 Remove FIXMEs surrounding Constant[Data]Vectors, instead
llvm-svn: 169938
2012-12-12 00:21:43 +00:00
Jim Grosbach 647c702780 Trim unneeded header #include.
llvm-svn: 169933
2012-12-11 23:39:51 +00:00
Dmitri Gribenko 134f76a2bc Documentation: cleanup: remove useless anchors and write :ref:s explicitly.
llvm-svn: 169932
2012-12-11 23:35:23 +00:00