Commit Graph

184159 Commits

Author SHA1 Message Date
Rui Ueyama 6d930787a7 Do not use llvm_unreachable at reachable code.
These lines can be reachable if we give a broken or unsupported
input object file.

llvm-svn: 219176
2014-10-07 00:40:54 +00:00
Gerolf Hoflehner c0b4c20e5e [InstCombine] re-commit r218721 icmp-select-icmp optimization
Takes care of the assert that caused build fails.
Rather than asserting the code checks now that the definition
and use are in the same block, and does not attempt
to optimize when that is not the case.

llvm-svn: 219175
2014-10-07 00:16:12 +00:00
David Majnemer 3349872cf3 driver: Map closed standard file descriptors to /dev/null
Utilize Process::FixupStandardFileDescriptors, introduced in r219170, to
guard against files from being treated as one of the standard file
descriptors.

llvm-svn: 219174
2014-10-06 23:52:23 +00:00
Fariborz Jahanian 35ee87debe Objective-C SDK modernizer. Patch to support modernization
to NS_ENUM/NS_OPTION macros when typedef names are other
than NSInteger/NSUInteger (int8_t, etc.).
rdar://18532199

llvm-svn: 219173
2014-10-06 23:50:37 +00:00
NAKAMURA Takumi c62436c60a ARMInstPrinter.cpp: Suppress a warning for -Asserts. [-Wunused-variable]
llvm-svn: 219172
2014-10-06 23:48:04 +00:00
NAKAMURA Takumi 3848e903e4 llvm/test/lit.cfg: Suppress dwarf stuff for targeting x86_64-mingw32 while investigating since r219108.
llvm-svn: 219171
2014-10-06 23:29:06 +00:00
David Majnemer 121a174f52 Support: Add a utility to remap std{in,out,err} to /dev/null if closed
It's possible to start a program with one (or all) of the standard file
descriptors closed.  Subsequent open system calls will give the program
a low-numbered file descriptor.

This is problematic because we may believe we are writing to standard
out instead of a file.

Introduce Process::FixupStandardFileDescriptors, a helper function to
remap standard file descriptors to /dev/null if they were closed before
the program started.

llvm-svn: 219170
2014-10-06 23:16:18 +00:00
Todd Fiala a9ae365b2d Add "target.expr-parser-compiler-args" setting.
This setting contains the following:
A list containing all the arguments to be passed to the expression parser compiler.

This change also ensures quoted arguments are handled appropriately.

See http://reviews.llvm.org/D5472 for more details.

Change by Tong Shen.

llvm-svn: 219169
2014-10-06 23:13:30 +00:00
Joerg Sonnenberger c3e7192fc0 Recognize aarch64_be as valid architecture.
llvm-svn: 219168
2014-10-06 23:05:04 +00:00
David Blaikie e44ee92a3f range-for some loops in DAE
llvm-svn: 219167
2014-10-06 22:59:29 +00:00
Eli Bendersky 11b6badd7b Update title of the ReleaseNodes doc.
It was still "3.5 (In-Progress)" - should be 3.6

llvm-svn: 219153
2014-10-06 22:45:17 +00:00
Jason Molenda 7dd293904d Add another address to check for the kernel's load addr in debug configs.
<rdar://problem/18560328> 

llvm-svn: 219152
2014-10-06 22:23:30 +00:00
Jason Molenda 02ad9378d7 Update xcode project file to match zach's move of connetionfiledescriptor in r219143.
llvm-svn: 219151
2014-10-06 22:15:29 +00:00
Duncan P. N. Exon Smith e5d7d9797b LoopUnroll: Change code order of changes to new basic blocks
Add new basic blocks to `LoopInfo` earlier.  No functionality change
intended (simplifies upcoming bugfix patch).

llvm-svn: 219150
2014-10-06 22:05:02 +00:00
Duncan P. N. Exon Smith 0bbf5418c6 Sink comment, NFC
llvm-svn: 219149
2014-10-06 22:04:59 +00:00
Enrico Granata b2c59e9faa And here's another test case that uses the SB API. Skip it too
llvm-svn: 219148
2014-10-06 22:00:35 +00:00
Enrico Granata 91c2d6d642 This test also relies on the SB API headers. Same logic
llvm-svn: 219147
2014-10-06 21:42:22 +00:00
Enrico Granata b633e43d2b In some cases, the LLDB test suite will be run on a built framework with no sources coming along. In those cases, we want to skip the SB API test case. Add a marker for that, and apply it
llvm-svn: 219146
2014-10-06 21:37:06 +00:00
Zachary Turner 12792af026 Create a ConnectionGenericFile class for Windows.
This is the first step in getting ConnectionFileDescriptor ported
to Windows. It implements a connection against a disk file for
windows. This supports connection strings of the form file://PATH
which are currently supported only on posix platforms in
ConnectionFileDescriptor.

Reviewed by: Greg Clayton
Differential Revision: http://reviews.llvm.org/D5608

llvm-svn: 219145
2014-10-06 21:23:09 +00:00
Zachary Turner 2885acee4d Make TimeValue support returning the time in milliseconds.
llvm-svn: 219144
2014-10-06 21:22:48 +00:00
Zachary Turner 93a66fc13a Move ConnectionFileDescriptor to platform-specific Host directory.
As part of getting ConnectionFileDescriptor working on Windows,
there is going to be alot of platform specific work to be done.
As a result, the implementation is moving into Host.  This patch
performs the code move and fixes up call-sites appropriately.

Reviewed by: Greg Clayton
Differential Revision: http://reviews.llvm.org/D5548

llvm-svn: 219143
2014-10-06 21:22:36 +00:00
Enrico Granata 9aceaa1be2 Fix a problem where LLDB was constructing a TypeImpl marking the dynamic type as the static type. Instead use the TypeImpl() constructor correctly
llvm-svn: 219142
2014-10-06 21:00:30 +00:00
Hal Finkel 9808595319 [DAGCombine] Remove SIGN_EXTEND-related inf-loop
The patch's author points out that, despite the function's documentation,
getSetCCResultType is only used to get the SETCC result type (with one
here-removed problematic exception). In one case, getSetCCResultType was being
used to get the predicate type to use for a SELECT node, and then
SIGN_EXTENDing (or truncating) to get the input predicate to match that type.
Unfortunately, this was happening inside visitSIGN_EXTEND, and creating new
SIGN_EXTEND nodes was causing an infinite loop. In addition, this behavior was
wrong if a target was not using ZeroOrNegativeOneBooleanContent. Lastly, the
extension/truncation seems unnecessary here: SELECT is defined as:

  Select(COND, TRUEVAL, FALSEVAL). If the type of the boolean COND is not i1
  then the high bits must conform to getBooleanContents.

So here we remove this use of getSetCCResultType and update
getSetCCResultType's documentation to reflect its actual uses.

Patch by deadal nix!

llvm-svn: 219141
2014-10-06 20:19:47 +00:00
Dan Albert cfc9229966 Fix win32 support header for mingw32.
These functions are defined as static in the mingw32 headers.

llvm-svn: 219140
2014-10-06 20:06:33 +00:00
Sanjay Patel 7bc9185ab5 Fast-math fold: x / (y * sqrt(z)) -> x * (rsqrt(z) / y)
The motivation is to recognize code such as this from /llvm/projects/test-suite/SingleSource/Benchmarks/BenchmarkGame/n-body.c:

float distance = sqrt(dx * dx + dy * dy + dz * dz);
float mag = dt / (distance * distance * distance);

Without this patch, we don't match the sqrt as a reciprocal sqrt, so for PPC the new testcase in this patch produces:

   addis 3, 2, .LCPI4_2@toc@ha
   lfs 4, .LCPI4_2@toc@l(3)
   addis 3, 2, .LCPI4_1@toc@ha
   lfs 0, .LCPI4_1@toc@l(3)
   fcmpu 0, 1, 4
   beq 0, .LBB4_2
# BB#1:
   frsqrtes 4, 1
   addis 3, 2, .LCPI4_0@toc@ha
   lfs 5, .LCPI4_0@toc@l(3)
   fnmsubs 13, 1, 5, 1
   fmuls 6, 4, 4
   fmadds 1, 13, 6, 5
   fmuls 1, 4, 1
   fres 4, 1                <--- reciprocal of reciprocal square root
   fnmsubs 1, 1, 4, 0
   fmadds 4, 4, 1, 4
.LBB4_2:
   fmuls 1, 4, 2
   fres 2, 1
   fnmsubs 0, 1, 2, 0
   fmadds 0, 2, 0, 2
   fmuls 1, 3, 0
   blr

After the patch, this simplifies to:

frsqrtes 0, 1
addis 3, 2, .LCPI4_1@toc@ha
fres 5, 2
lfs 4, .LCPI4_1@toc@l(3)
addis 3, 2, .LCPI4_0@toc@ha
lfs 7, .LCPI4_0@toc@l(3)
fnmsubs 13, 1, 4, 1
fmuls 6, 0, 0
fnmsubs 2, 2, 5, 7
fmadds 1, 13, 6, 4
fmadds 2, 5, 2, 5
fmuls 0, 0, 1
fmuls 0, 0, 2
fmuls 1, 3, 0
blr

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

llvm-svn: 219139
2014-10-06 19:31:18 +00:00
Bill Schmidt cad3a5f7d4 [PATCH][Power] Fix (and deprecate) vec_lvsl and vec_lvsr for little endian
The use of the vec_lvsl and vec_lvsr interfaces are discouraged for
little endian targets since Power8 hardware is a minimum requirement,
and Power8 provides reasonable performance for unaligned vector loads
and stores.  Up till now we have not provided "correct" (i.e., big-
endian-compatible) code generation for these interfaces, as to do so
produces poorly performing code.  However, this has become the source
of too many questions.

With this patch, LLVM will now produce compatible code for these
interfaces, but will also produce a deprecation warning message for
PPC64LE when one of them is used.  This should make the porting direction
clearer to programmers.  A similar patch has recently been committed to
GCC.

This patch includes a test for the warning message.  There is a companion
patch that adds two unit tests to projects/test-suite.

llvm-svn: 219137
2014-10-06 19:02:20 +00:00
Hal Finkel 43ce71f1b1 [BasicAA] Revert "Revert r218714 - Make better use of zext and sign information."
This reverts r218944, which reverted r218714, plus a bug fix.

Description of the bug in r218714 (by Nick)

The original patch forgot to check if the Scale in VariableGEPIndex flipped the
sign of the variable. The BasicAA pass iterates over the instructions in the
order they appear in the function, and so BasicAliasAnalysis::aliasGEP is
called with the variable it first comes across as parameter GEP1. Adding a
%reorder label puts the definition of %a after %b so aliasGEP is called with %b
as the first parameter and %a as the second. aliasGEP later calculates that %a
== %b + 1 - %idxprom where %idxprom >= 0 (if %a was passed as the first
parameter it would calculate %b == %a - 1 + %idxprom where %idxprom >= 0) -
ignoring that %idxprom is scaled by -1 here lead the patch to incorrectly
conclude that %a > %b.

Revised patch by Nick White, thanks! Thanks to Lang to isolating the bug.
Slightly modified by me to add an early exit from the loop and avoid
unnecessary, but expensive, function calls.

Original commit message:

Two related things:

 1. Fixes a bug when calculating the offset in GetLinearExpression. The code
    previously used zext to extend the offset, so negative offsets were converted
    to large positive ones.

 2. Enhance aliasGEP to deduce that, if the difference between two GEP
    allocations is positive and all the variables that govern the offset are also
    positive (i.e. the offset is strictly after the higher base pointer), then
    locations that fit in the gap between the two base pointers are NoAlias.

Patch by Nick White!

llvm-svn: 219135
2014-10-06 18:37:59 +00:00
Matt Arsenault c8a8217932 Update documentation with link to Sea Islands documentation
llvm-svn: 219134
2014-10-06 18:31:09 +00:00
Sean Callanan e6553d83aa Made TestCommandScript more robust against new
lines at arbitrary points.

llvm-svn: 219133
2014-10-06 17:58:15 +00:00
Rafael Espindola 6ff5f2e13b Remove cases that are now handled by the parent class implementation.
llvm-svn: 219132
2014-10-06 17:45:47 +00:00
Johannes Doerfert f1ee2622be [Fix] Dead statements should not confuse the RTC generation
This fixes http://llvm.org/bugs/show_bug.cgi?id=21166 .

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

llvm-svn: 219131
2014-10-06 17:43:00 +00:00
Duncan P. N. Exon Smith a7a90a2f19 BFI: Improve assertion message, since it's actually firing
This assertion is firing because -loop-unroll is failing to preserve
-loop-info (see PR20987).  Improve it.

llvm-svn: 219130
2014-10-06 17:42:00 +00:00
Eric Christopher 7647109917 Turn on the integrated assembler by default for ppc64 and
ppc64le.

Reviewed by Hal Finkel and Bill Schmidt.

llvm-svn: 219129
2014-10-06 17:33:18 +00:00
Tim Northover ea964f53c3 ARM: silence unused variable warning
llvm-svn: 219128
2014-10-06 17:26:36 +00:00
Tim Northover 8997fedfc6 ARM: remove dead InstPrinting code
This instruction form is handled by different AsmOperands now, so the code is
completely dead (and wrong anyway).

llvm-svn: 219127
2014-10-06 17:10:13 +00:00
Hans Wennborg 1b1a399489 MachObjectWriter: optimize the string table for common suffices
This is a follow-up to r207670 (ELF) and r218636 (COFF).

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

llvm-svn: 219126
2014-10-06 17:05:19 +00:00
Timur Iskhodzhanov 116033303b Fix dumping codeview line tables when there are multiple debug sections
Codeview line tables for functions in different sections refer to a common
STRING_TABLE_SUBSECTION for filenames.
This happens when building with -Gy or with inline functions with MSVC.

Original patch by Jeff Muizelaar!

llvm-svn: 219125
2014-10-06 16:59:44 +00:00
Fariborz Jahanian 2618dbaf5f Patch to wrap up '_' as separator in version numbers
in availability attribute by preserving this info.
in VersionTuple and using it in pretty printing of attributes
and yet using '.' as separator when diagnosing unavailable 
message calls. rdar://18490958

llvm-svn: 219124
2014-10-06 16:46:02 +00:00
Benjamin Kramer 6bf8af5de9 DbgValueHistoryCalculator: Store modified registers in a BitVector instead of std::set.
And iterate over the smaller map instead of the larger set first.  Reduces the time spent in
calculateDbgValueHistory by 30-40%.

llvm-svn: 219123
2014-10-06 15:31:04 +00:00
Hal Finkel 8eae3ad2ff [CFL-AA] Update for handling of globals and more tests
We used to return PartialAlias if *either* variable being queried interacted
with arguments or globals. AFAICT, we can change this to only returning
MayAlias iff *both* variables being queried interacted with arguments or
globals.

Also, adding some basic functionality tests: some basic IPA tests, checking
that we give conservative responses with arguments/globals thrown in the mix,
and ensuring that we trace values through stores and loads.

Note that saying that 'x' interacted with arguments or globals means that the
Attributes of the StratifiedSet that 'x' belongs to has any bits set.

Patch by George Burgess IV, thanks!

llvm-svn: 219122
2014-10-06 14:42:56 +00:00
Yaron Keren c8514a3421 Make the MD5 result name consistent between functions, header and source.
llvm-svn: 219121
2014-10-06 13:48:07 +00:00
Ed Maste cdbb5f08d6 Revert r219102 as it caused significant buildbot breakage
llvm-svn: 219120
2014-10-06 13:40:32 +00:00
Daniel Jasper a45eb4c000 clang-format: If in doubt, assume '+' is a binary operator.
Before:
  #define LENGTH(x, y) (x) - (y)+1

After:
  #define LENGTH(x, y) (x) - (y) + 1

llvm-svn: 219119
2014-10-06 13:16:43 +00:00
Samuel Benzaquen a117002d93 Fix bug in DynTypedMatcher::constructVariadic() that would cause false negatives.
Summary:
DynTypedMatcher::constructVariadic() where the restrict kind of the
different matchers are not related causes the matcher to have a "None"
restrict kind. This causes false negatives for anyOf and eachOf.
Change the logic to get a common ancestor if there is one.
Also added regression tests that fail without the fix.

Reviewers: klimek

Subscribers: klimek, cfe-commits

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

llvm-svn: 219118
2014-10-06 13:14:30 +00:00
Evgeniy Stepanov faef77480d [asan] Minor tweak to asan_device_setup.
Add another wait-for-device which may fix a flaky setup error.
Fix output message.

llvm-svn: 219117
2014-10-06 12:45:39 +00:00
Aaron Ballman d2a3f4765b Using an explicit cast to work around MSVC 2013 not picking the conversion operator as expected. NFC, should fix the MSVC build bots.
llvm-svn: 219116
2014-10-06 12:42:31 +00:00
Rafael Espindola 11527a1d71 Note that a gold bug has been fixed.
We should be able to stop working around it at some point in the future.

llvm-svn: 219115
2014-10-06 12:33:27 +00:00
Alexander Musman 81e652f86e [OPENMP] Fix target triple of a test, which uses __int128 type
llvm-svn: 219114
2014-10-06 11:36:48 +00:00
Alexander Musman 174b3ca682 [OPENMP] Limit the loop counters to 64 bits for the worksharing loops
llvm-svn: 219113
2014-10-06 11:16:29 +00:00
Benjamin Kramer 4ba642a2f7 X86: Drop the isConvertibleTo3Addr bit from shufps/shufpd now that we don't convert them anymore.
llvm-svn: 219112
2014-10-06 09:56:40 +00:00