Commit Graph

132772 Commits

Author SHA1 Message Date
Ted Kremenek 6f5131f149 Rename AnalyzerOptions 'EagerlyAssume' to 'eagerlyAssumeBinOpBifurcation'.
llvm-svn: 162930
2012-08-30 19:26:48 +00:00
Ted Kremenek 8756c4a1a9 Store const& to AnalyzerOptions in AnalysisManager instead of copying
individual flags.

llvm-svn: 162929
2012-08-30 19:26:43 +00:00
Ted Kremenek 45c5c0aa06 Move AnalyzerOptions.h to include/clang/StaticAnalyzer.
llvm-svn: 162928
2012-08-30 19:26:38 +00:00
Ted Kremenek 3cc42279c4 Move Analyses.def to include/clang/StaticAnalyzer.
llvm-svn: 162927
2012-08-30 19:26:33 +00:00
Nadav Rotem ea973bda26 Currently targets that do not support selects with scalar conditions and vector operands - scalarize the code. ARM is such a target
because it does not support CMOV of vectors. To implement this efficientlyi, we broadcast the condition bit and use a sequence of NAND-OR
to select between the two operands. This is the same sequence we use for targets that don't have vector BLENDs (like SSE2).

rdar://12201387

llvm-svn: 162926
2012-08-30 19:17:29 +00:00
Howard Hinnant aad745a024 Change sleep_for, sleep_until, and the condition_variable timed wait
functions to protect against duration and time_point overflow.  Since
we're about to wait anyway, we can afford to spend a few more cycles on
this checking.  I purposefully did not treat the timed try_locks with
overflow checking.  This fixes
http://llvm.org/bugs/show_bug.cgi?id=13721 .  I'm unsure if the standard
needs clarification in this area, or if this is simply QOI.  The
<chrono> facilities were never intended to overflow check, but just to
not overflow if durations stayed within +/- 292 years.

llvm-svn: 162925
2012-08-30 19:14:33 +00:00
Enrico Granata b7188a2d00 Pushing a new llvm.zip that enables the clang UTF conversion routines
llvm-svn: 162924
2012-08-30 19:09:14 +00:00
Fariborz Jahanian f257857443 objective-C: clang must implicitly convert
__objc_yes/__objc_no to (BOOL)1/(BOOL)0 when
BOOL is declared; otherwise it resorts to
default of 'signed char'. This is important to
selecting the correct Numeric API numberWithBool:
Can't have a clang test for this. Will checkin and
executable llvm test. // rdar://12156616

llvm-svn: 162922
2012-08-30 18:49:41 +00:00
Greg Clayton 0b0b512fd6 OptionValueFileSpec had an accessor to read the contents of the file and return the data. This can end up being used to get the string contents of a text file and could end up not being NULL terminated. I added accessors to get the file contents raw, or with a null terminator. Added the needed calls to make this happen in the FileSpec and File classes.
llvm-svn: 162921
2012-08-30 18:15:10 +00:00
Chad Rosier 738ea2590f [ms-inline asm] Add a new function, GetMCInstOperandNum, to the
AsmMatcherEmitter.  This function maps inline assembly operands to MCInst
operands.

For example, '__asm mov j, eax' is represented by the follow MCInst:

<MCInst 1460 <MCOperand Reg:0> <MCOperand Imm:1> <MCOperand Reg:0> 
             <MCOperand Expr:(j)> <MCOperand Reg:0> <MCOperand Reg:43>>

The first 5 MCInst operands are a result of j matching as a memory operand
consisting of a BaseReg (Reg:0), MemScale (Imm:1), MemIndexReg(Reg:0), 
Expr (Expr:(j), and a MemSegReg (Reg:0).  The 6th MCInst operand represents
the eax register (Reg:43).

This translation is necessary to determine the Input and Output Exprs.  If a
single asm operand maps to multiple MCInst operands, the index of the first
MCInst operand is returned.  Ideally, it would return the operand we really
care out (i.e., the Expr:(j) in this case), but I haven't found an easy way
of doing this yet.

llvm-svn: 162920
2012-08-30 17:59:25 +00:00
Michael Liao bbd10792c2 Introduce 'UseSSEx' to force SSE legacy encoding
- Add 'UseSSEx' to force SSE legacy insn not being selected when AVX is
  enabled.

  As the penalty of inter-mixing SSE and AVX instructions, we need
  prevent SSE legacy insn from being generated except explicitly
  specified through some intrinsics. For patterns supported by both
  SSE and AVX, so far, we force AVX insn will be tried first relying on
  AddedComplexity or position in td file. It's error-prone and
  introduces bugs accidentally.

  'UseSSEx' is disabled when AVX is turned on. For SSE insns inherited
  by AVX, we need this predicate to force VEX encoding or SSE legacy
  encoding only.

  For insns not inherited by AVX, we still use the previous predicates,
  i.e. 'HasSSEx'. So far, these insns fall into the following
  categories:
  * SSE insns with MMX operands
  * SSE insns with GPR/MEM operands only (xFENCE, PREFETCH, CLFLUSH,
    CRC, and etc.)
  * SSE4A insns.
  * MMX insns.
  * x87 insns added by SSE.

2 test cases are modified:

 - test/CodeGen/X86/fast-isel-x86-64.ll
   AVX code generation is different from SSE one. 'vcvtsi2sdq' cannot be
   selected by fast-isel due to complicated pattern and fast-isel
   fallback to materialize it from constant pool.

 - test/CodeGen/X86/widen_load-1.ll
   AVX code generation is different from SSE one after fixing SSE/AVX
   inter-mixing. Exec-domain fixing prefers 'vmovapd' instead of
   'vmovaps'.

llvm-svn: 162919
2012-08-30 16:54:46 +00:00
NAKAMURA Takumi 3ead47e718 ADTTests: [CMake] Exclude DenseMapTest.cpp and SmallVectorTest.cpp on MSVC9 due to its bug.
llvm-svn: 162918
2012-08-30 16:22:32 +00:00
NAKAMURA Takumi fa81438042 Apply "/Og-" also to MSC15(aka VS9) on VMCore/Function.cpp.
llvm-svn: 162917
2012-08-30 16:22:26 +00:00
NAKAMURA Takumi ac49029fd9 PPCISelLowering.cpp: Fix r162725.
[Tobias von Koch] What's happening here is that the CR6SET/CR6UNSET is breaking the chain of register copies glued to the function call (BL_SVR4 node). The scheduler then moves other instructions in between those and the function call, which isn't good!

Right. That's the case where there is no chain of register copies before the call, so InFlag == 0... Attached is a new revision of the patch which should fix this for good.

llvm-svn: 162916
2012-08-30 15:52:29 +00:00
NAKAMURA Takumi 8ad54e04d2 PPCISelLowering.cpp: Whitespace.
llvm-svn: 162915
2012-08-30 15:52:23 +00:00
Michael Ilseman 30c3e14e8e test
llvm-svn: 162914
2012-08-30 15:45:16 +00:00
Benjamin Kramer 17ce7117d0 Fix test case.
llvm-svn: 162913
2012-08-30 15:42:45 +00:00
Benjamin Kramer afdfdb5cff LoopRotate: Also rotate loops with multiple exits.
The old PHI updating code in loop-rotate was replaced with SSAUpdater a while
ago, it has no problems with comples PHIs. What had to be fixed is detecting
whether a loop was already rotated and updating dominators when multiple exits
were present.

This change increases overall code size a bit, mostly due to additional loop
unrolling opportunities. Passes test-suite and selfhost with -verify-dom-info.
Fixes PR7447.

Thanks to Andy for the input on the domtree updating code.

llvm-svn: 162912
2012-08-30 15:39:42 +00:00
Benjamin Kramer d4a64716ab InstCombine: Fix comment to reflect the code.
llvm-svn: 162911
2012-08-30 15:07:40 +00:00
Jakob Stoklund Olesen 0eecbbeb5b Don't use MCInstrDesc flags for implicit operands.
When a MachineInstr is constructed, its implicit operands are added
first, then the explicit operands are inserted before the implicits.

MCInstrDesc has oprand flags like early clobber and operand ties that
apply to the explicit operands.

Don't look at those flags when the implicit operands are first added in
the explicit operands's positions.

llvm-svn: 162910
2012-08-30 14:39:06 +00:00
Alexey Samsonov c3a8119a41 Whitespace/lint
llvm-svn: 162909
2012-08-30 14:22:21 +00:00
Dmitry Vyukov b244c46c66 tsan: speed up allocator64 GetBlockBegin()
llvm-svn: 162908
2012-08-30 13:55:43 +00:00
Alexey Samsonov f54e3aaeaa Whitespace
llvm-svn: 162907
2012-08-30 13:47:13 +00:00
Richard Smith 5edd5830e1 Make preprocessor act in a GCC-compatible fashion when a macro is redefined
within its own argument list. The original definition is used for the immediate
expansion, but the new definition is used for any subsequent occurences within
the argument list or after the expansion.

llvm-svn: 162906
2012-08-30 13:38:46 +00:00
Dmitry Vyukov 7af8a3a83d tsan: simplify TSAN_HISTORY_SIZE code
llvm-svn: 162905
2012-08-30 13:29:11 +00:00
Richard Smith b3afa6c483 PR13652: Don't assume the parameter array on a FunctionTypeLoc for a lambda will
be filled in; they won't if the lambda's declarator has an invalid type. Instead
take the parameters from the declarator directly.

llvm-svn: 162904
2012-08-30 13:13:20 +00:00
Benjamin Kramer a49705e5b8 WWW: Force word wrapping of the content to avoid horizontal scrolling.
This isn't perfect but avoids overlap of the menu and the content.

llvm-svn: 162903
2012-08-30 13:12:02 +00:00
Dmitry Vyukov 191f2f7cdb tsan: use stack depot to describe heap blocks
llvm-svn: 162902
2012-08-30 13:02:30 +00:00
Tobias Grosser cd95b77330 Pocc: Fix some bugs in the PoCC optimizer pass
This includes:
  - The isl_id of the domain of the scattering must be copied from the original
    domain
  - Remove outdated references to a 'FinalRead' statement
  - Print of the Pocc output, if -debug is provided.
  - Add line breaks to some error messages.

Reported and Debugged by:  Dustin Feld  <d3.feld@gmail.com>

llvm-svn: 162901
2012-08-30 11:49:38 +00:00
Tobias Grosser 4a7527e0eb Pluto: Print pluto input in debugging mode
llvm-svn: 162900
2012-08-30 11:49:31 +00:00
Nadav Rotem d5f5777b77 It is illegal to transform (sdiv (ashr X c1) c2) -> (sdiv x (2^c1 * c2)),
because C always rounds towards zero.

Thanks Dirk and Ben.

llvm-svn: 162899
2012-08-30 11:23:20 +00:00
Tim Northover ca9f384ff8 Add support for moving pure S-register to NEON pipeline if desired
llvm-svn: 162898
2012-08-30 10:17:45 +00:00
Dmitry Vyukov f4792878c4 asan/tsan: first version of "stack depot"
llvm-svn: 162897
2012-08-30 10:02:48 +00:00
Nadav Rotem 9bf4e5d3f6 remove old docs
llvm-svn: 162896
2012-08-30 09:23:13 +00:00
Alexey Samsonov 45be793e3a Refactor fetching file/line info from DWARFContext to simplify the
code and allow better code reuse. Make the code a bit more conforming
to LLVM code style.
No functionality change.

llvm-svn: 162895
2012-08-30 07:49:50 +00:00
Craig Topper 2da13f9ef8 Add FMA to switch statement in VectorLegalizer::LegalizeOp so that it can be expanded when it isn't legal.
llvm-svn: 162894
2012-08-30 07:34:22 +00:00
Craig Topper c8f5d77e75 Add support for FMA to WidenVectorResult.
llvm-svn: 162893
2012-08-30 07:13:41 +00:00
Craig Topper e39ad7b549 Only perform DAG combine on FMAs of legal types.
llvm-svn: 162892
2012-08-30 06:56:15 +00:00
Ted Kremenek 53f3e7dba3 Change -analyzer-config to use '=' as the key-value separator, and only
support the '-analyzer-config key=val' variant.

llvm-svn: 162891
2012-08-30 05:49:16 +00:00
Nico Weber 723b4f02a7 Reland r160052: Default to -std=c++11 on Windows.
Also update the tests that rely on c++98 to explicitly mention that.

llvm-svn: 162890
2012-08-30 02:08:31 +00:00
Nico Weber 077a53e5ab Tooling: Add a runToolOnCodeWithArgs() function that allows
passing additional parameters to a tool.

Use this to fix a FIXME in testing code.

llvm-svn: 162889
2012-08-30 02:02:19 +00:00
Bill Wendling 14c8a051ca Pass by pointer and not std::string.
llvm-svn: 162888
2012-08-30 01:32:31 +00:00
Michael Liao b94f47a8f5 Fix C++ comment in C source
llvm-svn: 162887
2012-08-30 00:45:32 +00:00
Eli Friedman 448ce40426 Fix a crash in type merging with enum types.
llvm-svn: 162886
2012-08-30 00:44:15 +00:00
Michael Liao 271f11b571 Should put test case under test/ExecutionEngine/MCJIT/
llvm-svn: 162885
2012-08-30 00:43:57 +00:00
Bill Wendling 8c0b4bc339 Emit .gcda files as absolute paths instead of relative paths.
This improves compatibility with gcc in this regard, and this file generation
can be ameliorated with GCOV_PREFIX and GCOV_PREFIX_STRIP. It's also useful if
your build directory doesn't specify -o <abspath> and it uses a recursive make
structure, so it's not relative to the toplevel.

Patch by Joshua Cranmer!
<rdar://problem/12179524>

llvm-svn: 162884
2012-08-30 00:43:41 +00:00
Bill Wendling 1f6f8c2cb7 Revert r162855 in favor of changing clang to emit the absolute coverage file path.
llvm-svn: 162883
2012-08-30 00:34:21 +00:00
Will Dietz 2df50b715c Fix HashString's Bernstein hash to use unsigned chars, as is usually done.
Changes the hash result for strings containing characters
with values >= 128, such as UTF8 strings (not normal ASCII).

Changed mostly so we match other implementations.

llvm-svn: 162882
2012-08-30 00:30:21 +00:00
Michael Liao 3c8980646b Fix PR13727
- The root cause is that target constant materialization in X86 fast-isel
  creates a PC-rel addressing which may overflow 32-bit range in non-Small code
  model if .rodata section is allocated too far away from code segment in
  MCJIT, which uses Large code model so far.
- Follow the similar logic to fix non-Small code model in fast-isel by skipping
  non-Small code model.

llvm-svn: 162881
2012-08-30 00:30:16 +00:00
Ted Kremenek 2aa89dd03e Make this test portable.
llvm-svn: 162880
2012-08-30 00:27:25 +00:00