Commit Graph

214486 Commits

Author SHA1 Message Date
Craig Topper 45e83b8ba7 [X86] Remove assertions that check for valid scale values on scatter/gather intrinsics. Nothing upstream prevented illegal values from getting here.
llvm-svn: 251780
2015-11-02 07:24:40 +00:00
Craig Topper cc56e3a1fc [X86] Don't pass a scale value of 0 to scatter/gather intrinsics. This causes the code emitter to throw an assertion if we try to encode it. Need to add a check to fail isel for this, but for now avoid testing it.
llvm-svn: 251779
2015-11-02 07:24:37 +00:00
Craig Topper e69eb78510 [X86] Fold 'if' followed by just an llvm_unreachable into an assert.
llvm-svn: 251778
2015-11-02 07:24:34 +00:00
Craig Topper aebab7c03f [X86] Use isa instead of dyn_cast in a bool context. NFC
llvm-svn: 251777
2015-11-02 07:24:32 +00:00
Craig Topper c70af642a2 [X86] Remove some llvm_unreachables after switches that already have an unreachable in their default case.
llvm-svn: 251776
2015-11-02 07:24:30 +00:00
Craig Topper d6a77ca4bb [X86] Remove a 'break' after an llvm_unreachable.
llvm-svn: 251775
2015-11-02 07:24:27 +00:00
Craig Topper d49a41793c [X86] Use cast instead of dyn_cast and a null check marked unreachable.
llvm-svn: 251774
2015-11-02 07:24:25 +00:00
Craig Topper a8d0be0cd6 Fix a -Wpessimizing-move warning.
llvm-svn: 251773
2015-11-02 05:24:28 +00:00
Craig Topper 95ceb5a60a [X86] Use MVT instead of EVT when the type is known to be simple. NFC
llvm-svn: 251772
2015-11-02 05:24:22 +00:00
Xinliang David Li 2004f003b6 [PGO] Value profiling (index format) code cleanup and testing
1. Added a set of public interfaces in InstrProfRecord
    class to access (read/write) value profile data.
 2. Changed IndexedProfile reader and writer code to 
    use the newly defined interfaces and hide implementation
    details.
 3. Added a couple of unittests for value profiling:
   - Test new interfaces to get and set value profile data
   - Test value profile data merging with various scenarios.

 No functional change is expected. The new interfaces will also
 make it possible to change on-disk format of value prof data
 to be more compact (to be submitted). 

llvm-svn: 251771
2015-11-02 05:08:23 +00:00
Sanjoy Das 52bfa0faa4 [SCEV] Fix PR25369
Have `getConstantEvolutionLoopExitValue` work correctly with multiple
entry loops.

As far as I can tell, `getConstantEvolutionLoopExitValue` never did the
right thing for multiple entry loops; and before r249712 it would
silently return an incorrect answer.  r249712 changed SCEV to fail an
assert on a multiple entry loop, and this change fixes the underlying
issue.

llvm-svn: 251770
2015-11-02 02:06:01 +00:00
NAKAMURA Takumi 50df0c2037 Untabify.
llvm-svn: 251769
2015-11-02 01:38:12 +00:00
Marshall Clow 6028c03976 Add 'nostdinc++' to the flags used by testit. Makes the tests run better on Mac OS X with the new depr.c headers change
llvm-svn: 251768
2015-11-01 21:14:22 +00:00
Marshall Clow 00ec0bf828 Improve the tests for 'is_literal_type'
llvm-svn: 251767
2015-11-01 21:13:10 +00:00
Marshall Clow dd0ef09954 Implement the first part of P0006R0: Adopt Type Traits Variable Templates for C++17. Significantly augment the existing tests.
llvm-svn: 251766
2015-11-01 20:24:59 +00:00
Davide Italiano 83b3481601 [LibraryInfo] Point to FreeBSD HEAD repo and not to a dolphin branch.
The latter might go away (anytime soon).

llvm-svn: 251765
2015-11-01 17:00:13 +00:00
Elena Demikhovsky db738d9cc3 AVX-512: Optimized SIMD truncate operations for AVX512F set.
Optimized <8 x i32> to <8 x i16>
<4 x i64> to < 4 x i32>
<16 x i16> to <16 x i8>
All these oprtrations use now AVX512F set (KNL). Before this change it was implemented with AVX2 set.


Differential Revision: http://reviews.llvm.org/D14108

llvm-svn: 251764
2015-11-01 11:45:47 +00:00
Saleem Abdulrasool 50406b92ec RuntimeDyld: add COFF i386 support
This adds support for COFF I386.  This is sufficient for code execution in a
32-bit JIT, though, imported symbols need to custom lowered for the redirection.

llvm-svn: 251761
2015-11-01 01:26:15 +00:00
Daniel Jasper f67c32466d clang-format: Be slightly more cautious when formatting subsequent lines after a change. With r251474, clang-format could indent the entire rest of the file, if there is a missing closing brace, e.g. while writing code in an editor.
Summary:
With this change, clang-format stops formatting when either it leaves
the current scope or when it comes back to the initial scope after
going into a nested one.

Reviewers: klimek

Subscribers: cfe-commits, klimek

Differential Revision: http://reviews.llvm.org/D14213

llvm-svn: 251760
2015-11-01 00:27:35 +00:00
Rafael Espindola 2f5e8874f3 Make a few definitions static. NFC.
llvm-svn: 251759
2015-11-01 00:14:59 +00:00
Rafael Espindola e0d3080313 Use Child instead of child_iterator in the archive writer.
We never need to pass end(). This will also remove some complication
once we start adding error checking.

llvm-svn: 251758
2015-11-01 00:10:37 +00:00
Davide Italiano 5cdf915191 Simplify a check. NFC.
llvm-svn: 251757
2015-11-01 00:09:16 +00:00
Sanjoy Das 337d4786e1 [SCEV] Don't create SCEV expressions that break LCSSA
Prevent `createNodeFromSelectLikePHI` from creating SCEV expressions
that break LCSSA.

A better fix for the same issue is to teach SCEVExpander to not break
LCSSA by inserting PHI nodes at appropriate places.  That's planned for
the future.

Fixes PR25360.

llvm-svn: 251756
2015-10-31 23:21:40 +00:00
Sanjoy Das f25d25a156 [SCEV] Use auto and range for; NFC
llvm-svn: 251755
2015-10-31 23:21:32 +00:00
Davide Italiano 396f3eeafb [SimplifyLibCalls] Factor out other common code.
llvm-svn: 251754
2015-10-31 23:17:45 +00:00
Rafael Espindola 266b4fe8ad This can take a const reference. NFC.
llvm-svn: 251753
2015-10-31 22:25:59 +00:00
Diego Novillo f9ed08e16e SamplePGO - Count sample records in embedded profiles when computing coverage.
The initial coverage checking code for sample records failed to count
records inside inlined profiles. This change fixes the oversight.

llvm-svn: 251752
2015-10-31 21:53:58 +00:00
Craig Topper ec2ea4817e [X86] Replace getScalarType with getVectorElementType when the type is already known to be a vector. This should result in slightly less code. NFC
llvm-svn: 251751
2015-10-31 21:44:52 +00:00
Rafael Espindola 43358761f7 Don't store a Child to the first regular member.
This is a bit ugly, but has a few advantages:
* Archive is now easy to copy since there is no Archive -> Child -> Archive
  loop.
* It makes it clear that we already checked for errors when finding the Child
  data.

llvm-svn: 251750
2015-10-31 21:44:42 +00:00
Rafael Espindola 47b01d4f4f Delete dead code.
llvm-svn: 251749
2015-10-31 21:16:01 +00:00
Rafael Espindola 4a782fbfe6 Simplify handling of archive Symbol tables.
We only need to store a StringRef.

llvm-svn: 251748
2015-10-31 21:03:29 +00:00
Davide Italiano 7f253aa63c [SimplifyLibCalls] Add test to ensure transform is not executed if fast-math
attribute is not present.

During my refactor in r251595 I changed the behavior of optimizeSqrt(),
skipping the transformation if the function wasn't marked with unsafe-fp-math
attribute. This fixed a bug, as confirmed by Sanjay (before the optimization
was silently executed anyway), although it wasn't my primary aim.
This commit adds a test to ensure the code doesn't break again.

Reported by: Marcello Maggioni
Discussed with: Sanjay Patel

llvm-svn: 251747
2015-10-31 20:59:32 +00:00
Rafael Espindola 8f23882f49 Simplify the handling of the archive string table.
We only need to store a StringRef

llvm-svn: 251746
2015-10-31 20:06:13 +00:00
Craig Topper 476be8f94a [X86] Convert to MVT instead of calling EVT functions since we already know the type is simple. NFC
llvm-svn: 251745
2015-10-31 18:14:17 +00:00
Craig Topper 0fec4d8ce7 [X86] Call getScalarSizeInBits() instead of getScalarType().getScalarSizeInBits(). NFC
llvm-svn: 251744
2015-10-31 18:14:15 +00:00
Craig Topper 0e7680da9f [X86] Remove two const references to the return value of a constructor and just use normal object creation syntax. NFC
llvm-svn: 251743
2015-10-31 17:28:02 +00:00
Craig Topper 7b1d3a8a6c [X86] Replace EVT with MVT in some more places. NFC
llvm-svn: 251742
2015-10-31 17:27:59 +00:00
Craig Topper 63c2925b87 [X86] Fix indentation of case statements in switch. NFC
llvm-svn: 251741
2015-10-31 17:27:56 +00:00
Craig Topper 5c8a378f48 [X86] Reduce math for index calculation for inserting and extracting subvectors and elements by exploiting the fact that all supported vector types have a power 2 number of elements.
llvm-svn: 251740
2015-10-31 17:27:52 +00:00
David Majnemer 6bf02820bc [MSVC Compat] Permit conversions from pointer-to-function to pointer-to-object iff -fms-compatibility
We permit implicit conversion from pointer-to-function to
pointer-to-object when -fms-extensions is specified.  This is rather
unfortunate, move this into -fms-compatibility and only permit it within
system headers unless -Wno-error=microsoft-cast is specified.

llvm-svn: 251738
2015-10-31 08:42:14 +00:00
Davide Italiano 3817486c47 [SimplifyLibCalls] Remove dead code.
llvm-svn: 251737
2015-10-31 08:28:10 +00:00
Michael Gottesman ef711c1831 Add a unittest for SmallDenseMap that tests assigning a SmallDenseMap when it is not small.
This complements CopyConstructorNotSmallTest. If we are testing the copy
constructor in such a way, we should also probably test assignment in the same
way.

llvm-svn: 251736
2015-10-31 05:23:53 +00:00
Akira Hatanaka 7791f1a4a9 [CodeGen] Call SetInternalFunctionAttributes to attach function
attributes to internal functions.

This patch fixes CodeGenModule::CreateGlobalInitOrDestructFunction to
use SetInternalFunctionAttributes instead of SetLLVMFunctionAttributes
to attach function attributes to internal functions.

Also, make sure the correct CGFunctionInfo is passed instead of always
passing what arrangeNullaryFunction returns.

rdar://problem/20828324

Differential Revision: http://reviews.llvm.org/D13610

llvm-svn: 251734
2015-10-31 01:28:07 +00:00
Eugene Zelenko dbb0abbf47 Fix Clang-tidy modernize-use-nullptr warnings in include/lldb/API and source/API; other minor fixes.
Other fixes should reduce number of readability-redundant-smartptr-get and readability-implicit-bool-cast.

llvm-svn: 251733
2015-10-31 01:22:59 +00:00
Enrico Granata 2ef8822951 Harden this test case to do the right thing in the face of compiler changes
llvm-svn: 251732
2015-10-31 01:19:27 +00:00
Lang Hames 5796eb2d10 Add a sys::OwningMemoryBlock class, which is a sys::MemoryBlock that owns its
underlying memory, and will automatically release it on destruction.

Use this to tidy up the orc::IndirectStubsInfo class.

llvm-svn: 251731
2015-10-31 00:55:32 +00:00
Eugene Zelenko adb5b1dfc2 Fix Clang-tidy modernize-use-override warnings in include/lldb/Expression, source/Expression and tools/lldb-mi; other minor fixes.
llvm-svn: 251730
2015-10-31 00:43:59 +00:00
Saleem Abdulrasool a174241cf1 Sema: correct typo recovery with blocks
Handle blocks in the tree transform for the typo correction as otherwise, the
capture may miss.  This would trigger an assertion.  Thanks to Doug Gregor for
the help with this!

Fixes PR25001.

llvm-svn: 251729
2015-10-31 00:39:15 +00:00
Chandler Carruth cada2d8d1e [FunctionAttrs] Inline the prototype attribute inference to an existing
loop over the SCC.

The separate function wasn't really adding much, NFC.

llvm-svn: 251728
2015-10-31 00:28:37 +00:00
Jim Ingham 98e6daf1fb Abstract the notion of the truth value of an expression result, for use
in breakpoint conditions.

llvm-svn: 251727
2015-10-31 00:02:18 +00:00