Tobias Grosser [Thu, 14 Jul 2016 15:51:37 +0000 (15:51 +0000)]
GPGPU: Generate an AST for the GPU-mapped schedule
For this we need to provide an explicit list of statements as they occur in
the polly::Scop to ppcg.
We also setup basic AST printing facilities to facilitate debugging. To allow
code reuse some (minor) changes in ppcg are have been necessary.
llvm-svn: 275436
Tobias Grosser [Thu, 14 Jul 2016 15:51:32 +0000 (15:51 +0000)]
GPGPU: Add dummy implementation for ast expression construction
Instead of calling to a pet function that does not return anything, we pass
our own dummy implementation to ppcg that always returns a nullptr. This
ensures that the list of ast expressions always contains a nullptr and we do
not accidentally free a random (uninitalized) pointer. This resolves the
last valgrind warning we see.
We provide an implementation for this function, when the generated AST
expressions can be used and consequently can be tested.
llvm-svn: 275435
Tom Stellard [Thu, 14 Jul 2016 15:50:27 +0000 (15:50 +0000)]
GlobalsAA: Functions with the argmemonly attribute won't read arbitrary globals
Summary:
In preparation for changing GlobalsAA to stop assuming that intrinsics
can't read arbitrary globals, we need to make sure GlobalsAA is querying
function attributes rather than relying on this assumption.
This patch was inspired by: http://reviews.llvm.org/D20206
Reviewers: jmolloy, hfinkel
Subscribers: eli.friedman, llvm-commits
Differential Revision: https://reviews.llvm.org/D21318
llvm-svn: 275433
Nico Weber [Thu, 14 Jul 2016 15:40:22 +0000 (15:40 +0000)]
Don't optimize movs to pushes in -O0 builds.
https://reviews.llvm.org/D22362
llvm-svn: 275431
Aaron Ballman [Thu, 14 Jul 2016 15:32:11 +0000 (15:32 +0000)]
Removing a few more :option: tags that we do not have corresponding .. option directives for; these are causing the sphinx bot to fail (lab.llvm.org:8011/builders/clang-sphinx-docs/builds/15197/steps/docs-clang-html/logs/stdio).
llvm-svn: 275430
Nico Weber [Thu, 14 Jul 2016 15:07:44 +0000 (15:07 +0000)]
Delete some trailing whitespace.
llvm-svn: 275429
Benjamin Kramer [Thu, 14 Jul 2016 15:06:57 +0000 (15:06 +0000)]
[OpenCL] In test/Driver/opencl.cl, don't require name of Clang binary to contain "clang"
The test currently fails if the name of the Clang binary doesn't contain "clang".
This patch removes that requirement, as some environments may choose to run the test with a differently named binary. This shouldn't make the test any less strict -- the only place where the flags we're searching for can really occur is the Clang command line.
Patch by Martin Böhme!
Differential Revision: https://reviews.llvm.org/D22359
llvm-svn: 275428
Ahmed Bougacha [Thu, 14 Jul 2016 14:53:21 +0000 (14:53 +0000)]
[X86] Decode MPX BND registers.
We were able to assemble, but not disassemble.
Note that fixupRMValue was truncating EA_REG_BND0-3 because we hit
the uint8_t max. The control registers were already squarely above
it, but I don't think they ever go in .r/m, only in .reg.
I also did notice an extra REX.W in our encoding, but I think that's
fine.
llvm-svn: 275427
Ahmed Bougacha [Thu, 14 Jul 2016 14:53:17 +0000 (14:53 +0000)]
[X86] Don't mark addressing mode operands as "outs". NFC-ish.
Nothing in-tree can tell the difference, but it's incorrect: the
addressing mode registers aren't what's defined.
llvm-svn: 275426
Ahmed Bougacha [Thu, 14 Jul 2016 14:53:14 +0000 (14:53 +0000)]
[TableGen] Autobrief-ize Record. NFC.
llvm-svn: 275425
Ahmed Bougacha [Thu, 14 Jul 2016 14:53:11 +0000 (14:53 +0000)]
[TableGen] Cleanup Record comments. NFC.
LLVM doesn't use exceptions anymore.
Also remove the implementation comments. Some of them diverged.
llvm-svn: 275424
Ahmed Bougacha [Thu, 14 Jul 2016 14:52:55 +0000 (14:52 +0000)]
[GlobalISel] Fix #include ordering/spacing. NFC.
llvm-svn: 275423
Sam Kolton [Thu, 14 Jul 2016 14:50:35 +0000 (14:50 +0000)]
[AMDGPU] Assembler: fix row_bcast parsing
Summary: This change fix bug 28538
Reviewers: tstellarAMD, vpykhtin
Subscribers: arsenm, kzhuravl
Differential Revision: https://reviews.llvm.org/D22355
llvm-svn: 275422
Nico Weber [Thu, 14 Jul 2016 14:49:35 +0000 (14:49 +0000)]
Revert r275411, it cause PR28552.
llvm-svn: 275421
Nico Weber [Thu, 14 Jul 2016 14:41:25 +0000 (14:41 +0000)]
Revert r275401, it caused PR28551.
llvm-svn: 275420
Matthew Simpson [Thu, 14 Jul 2016 14:36:06 +0000 (14:36 +0000)]
[LV] Avoid unnecessary IV scalar-to-vector-to-scalar conversions
This patch prevents increases in the number of instructions, pre-instcombine,
due to induction variable scalarization. An increase in instructions can lead
to an increase in the compile-time required to simplify the induction
variables. We now maintain a new map for scalarized induction variables to
prevent us from converting between the scalar and vector forms.
This patch should resolve compile-time regressions seen after r274627.
llvm-svn: 275419
Tobias Grosser [Thu, 14 Jul 2016 14:14:02 +0000 (14:14 +0000)]
GPGPU: Use a tile size of 32 by default
The tile size was previously uninitialized. As a result, it was often zero (aka.
no tiling), which is not what we want in general. More importantly, there was
the risk for arbitrary tile sizes to be choosen, which we did not observe, but
which still is highly problematic.
llvm-svn: 275418
Roger Ferrer Ibanez [Thu, 14 Jul 2016 14:10:43 +0000 (14:10 +0000)]
Diagnose taking address and reference binding of packed members
This patch implements PR#22821.
Taking the address of a packed member is dangerous since the reduced
alignment of the pointee is lost. This can lead to memory alignment
faults in some architectures if the pointer value is dereferenced.
This change adds a new warning to clang emitted when taking the address
of a packed member. A packed member is either a field/data member
declared as attribute((packed)) or belonging to a struct/class
declared as such. The associated flag is -Waddress-of-packed-member.
Conversions (either implicit or via a valid casting) to pointer types
with lower or equal alignment requirements (e.g. void* or char*)
silence the warning.
This change also adds a new error diagnostic when the user attempts to
bind a reference to a packed member, regardless of the alignment.
Differential Revision: https://reviews.llvm.org/D20561
llvm-svn: 275417
Aaron Ballman [Thu, 14 Jul 2016 14:07:37 +0000 (14:07 +0000)]
Removing more :option: tags that we do not have corresponding .. option directives for; these are causing the sphinx bot to fail (lab.llvm.org:8011/builders/clang-sphinx-docs/builds/15195/steps/docs-clang-html/logs/stdio).
llvm-svn: 275416
Pierre Gousseau [Thu, 14 Jul 2016 13:58:27 +0000 (13:58 +0000)]
The test added in r275267 does not work on read-only checkouts because of the use of touch -m -t.
Following Tom Rybka suggestion, the test files are now copied to a temporary directory first.
llvm-svn: 275415
Nico Weber [Thu, 14 Jul 2016 13:54:26 +0000 (13:54 +0000)]
Teach fast isel calls and rets about stdcall.
stdcall is callee-pop like thiscall, so the thiscall changes already did most
of the work for this. This change only opts stdcall in and adds tests.
llvm-svn: 275414
Simon Pilgrim [Thu, 14 Jul 2016 13:40:53 +0000 (13:40 +0000)]
[X86][AVX] Added an additional vperm2f128 memory folding test
llvm-svn: 275413
Simon Pilgrim [Thu, 14 Jul 2016 13:29:23 +0000 (13:29 +0000)]
Remove trailing whitespace.
llvm-svn: 275412
Simon Pilgrim [Thu, 14 Jul 2016 13:28:43 +0000 (13:28 +0000)]
[X86][AVX2] Allow VPERMPD/VPERMQ shuffles to call combineShuffle
This improves the situation discussed in D19228 where we were forcing VPERMPD/VPERMQ where VPERM2F128/VPERM2I128 would have been better.
llvm-svn: 275411
Daniel Sanders [Thu, 14 Jul 2016 13:25:22 +0000 (13:25 +0000)]
[mips] SelectionDAGISel subclasses now follow the optimization level.
Summary:
It was recently discovered that, for Mips's SelectionDAGISel subclasses,
all optimization levels caused SelectionDAGISel to behave like -O2.
This change adds the necessary plumbing to initialize the optimization level.
Reviewers: andrew.w.kaylor
Subscribers: andrew.w.kaylor, sdardis, dean, llvm-commits, vradosavljevic, petarj, qcolombet, probinson, dsanders
Differential Revision: https://reviews.llvm.org/D14900
llvm-svn: 275410
Benjamin Kramer [Thu, 14 Jul 2016 13:15:37 +0000 (13:15 +0000)]
Upgrade all the .arcconfigs to https.
llvm-svn: 275409
Aaron Ballman [Thu, 14 Jul 2016 13:08:16 +0000 (13:08 +0000)]
Speculatively fix the sphinx build, which does not think the original code was valid nasm (lab.llvm.org:8011/builders/llvm-sphinx-docs/builds/11854/steps/docs-llvm-html/logs/stdio).
llvm-svn: 275408
Aaron Ballman [Thu, 14 Jul 2016 13:01:00 +0000 (13:01 +0000)]
This is a malformed :option: tag -- we don't have an option directive that matches it, so turning it actual text instead of a markup tag. This will hopefully fix the clang docs build (lab.llvm.org:8011/builders/clang-sphinx-docs/builds/15194/steps/docs-clang-html/logs/stdio)
llvm-svn: 275407
Simon Pilgrim [Thu, 14 Jul 2016 12:58:04 +0000 (12:58 +0000)]
[X86][AVX] Add support for narrowing 128-bit+ shuffle mask elements to 64-bits to allow combining
Primarily this is to allow blend with zero instead of having to use vperm2f128, but we can use this in the future to deal with AVX512 cases where we need to keep the original element size to correctly fold masked operations.
llvm-svn: 275406
Benjamin Kramer [Thu, 14 Jul 2016 12:56:21 +0000 (12:56 +0000)]
[OpenCL] Actually activate Frontend/opencl.cl test and fix test bugs
rL275318 added the test Frontend/opencl.cl test, but that test was never actually run because Frontend/lit.local.cfg doesn't contain the '.cl' file suffix.
Once the test is activated, it fails with (unintended) compile errors in the newly added CHECK_INVALID_OPENCL_VERSION checks.
This patch adds the '.cl' file suffix to Frontend/lit.local.cfg to activate the test and fixes the test bug by adding '-fblocks' to the relevant command lines.
Patch by Martin Böhme!
Differential Revision: http://reviews.llvm.org/D22349
llvm-svn: 275405
Aaron Ballman [Thu, 14 Jul 2016 12:35:00 +0000 (12:35 +0000)]
Correct the attribute documentation for the new XRay attributes. Fixes the documentation build.
llvm-svn: 275404
Sjoerd Meijer [Thu, 14 Jul 2016 12:23:48 +0000 (12:23 +0000)]
This converts a signed remainder instruction to unsigned remainder, which
enables the code size optimisation to fold a rem and div into a single
aeabi_uidivmod call. This was not happening before because sdiv was converted
but srem not, and instructions with different signedness are not combined.
Differential Revision: http://reviews.llvm.org/D22214
llvm-svn: 275403
Simon Pilgrim [Thu, 14 Jul 2016 12:21:40 +0000 (12:21 +0000)]
[X86][AVX] Add 128-bit wide shuffle tests that should combine to blend-with-zero
llvm-svn: 275402
Sebastian Pop [Thu, 14 Jul 2016 12:18:53 +0000 (12:18 +0000)]
code hoisting pass based on GVN
This pass hoists duplicated computations in the program. The primary goal of
gvn-hoist is to reduce the size of functions before inline heuristics to reduce
the total cost of function inlining.
Pass written by Sebastian Pop, Aditya Kumar, Xiaoyu Hu, and Brian Rzycki.
Important algorithmic contributions by Daniel Berlin under the form of reviews.
Differential Revision: http://reviews.llvm.org/D19338
llvm-svn: 275401
Simon Pilgrim [Thu, 14 Jul 2016 12:07:43 +0000 (12:07 +0000)]
[X86][AVX] Add VBROADCASTF128/VBROADCASTI128 shuffle comments support
llvm-svn: 275400
Dean Michael Berris [Thu, 14 Jul 2016 11:46:41 +0000 (11:46 +0000)]
Remove extra ';' to appease -Wpedantic
Summary:
Reviewers: dok
Subscribers: llvm-commits
llvm-svn: 275399
Simon Pilgrim [Thu, 14 Jul 2016 11:05:43 +0000 (11:05 +0000)]
[X86][AVX] Regenerate broadcast upgrade tests
llvm-svn: 275398
Tobias Grosser [Thu, 14 Jul 2016 10:53:00 +0000 (10:53 +0000)]
Fix formatting
llvm-svn: 275397
Tobias Grosser [Thu, 14 Jul 2016 10:51:52 +0000 (10:51 +0000)]
GPGPU: Map initial schedule to GPU schedule
This change now applies ppcg's GPU mapping on our initial schedule. For this
to work, we need to also initialize the set of all names (isl_ids) used in
the scop as well as the program context.
llvm-svn: 275396
Tobias Grosser [Thu, 14 Jul 2016 10:51:47 +0000 (10:51 +0000)]
GPGPU: Do not dump schedule by default
llvm-svn: 275395
Pavel Labath [Thu, 14 Jul 2016 10:43:24 +0000 (10:43 +0000)]
mark newly failing tests as XFAIL
llvm-svn: 275394
Pavel Labath [Thu, 14 Jul 2016 10:43:21 +0000 (10:43 +0000)]
[test] [linux] define PR_SET_PTRACER constants if the system does not provide them
Android API <= 16 header do not have these symbols defined, but the kernel does support the
relevant calls. And in general, since these calls are on a best-effort basis, it won't hurt even
if we try to run in on a really ancient kernel.
llvm-svn: 275393
Roman Gareev [Thu, 14 Jul 2016 10:40:15 +0000 (10:40 +0000)]
[NFC] Add full title/author information to "Apply the BLIS matmul optimization pattern"
llvm-svn: 275392
Simon Pilgrim [Thu, 14 Jul 2016 10:37:14 +0000 (10:37 +0000)]
[X86][AVX2] VBROADCASTSSrr/VBROADCASTSSYrr require AVX2 not AVX
llvm-svn: 275391
Tobias Grosser [Thu, 14 Jul 2016 10:22:25 +0000 (10:22 +0000)]
GPGPU: compute new schedule from polly scop
To do so we copy the necessary information to compute an initial schedule from
polly::Scop to ppcg's scop. Most of the necessary information is directly
available and only needs to be passed on to ppcg, with the exception of 'tagged'
access relations, access relations that additionally carry information about
which memory access an access relation originates from.
We could possibly perform the construction of tagged accesses as part of
ScopInfo, but as this format is currently specific to ppcg we do not do this
yet, but keep this functionality local to our GPU code generation.
After the scop has been initialized, we compute data dependences and ask ppcg to
compute an initial schedule. Some of this functionality is already available in
polly::DependenceInfo and polly::ScheduleOptimizer, but to keep differences
to ppcg small we use ppcg's functionality here. We may later investiage if
a closer integration of these tools makes sense.
llvm-svn: 275390
Tobias Grosser [Thu, 14 Jul 2016 10:22:19 +0000 (10:22 +0000)]
GPGPU: create default initialized PPCG scop and gpu program
At this stage, we do not yet modify the IR but just generate a default
initialized ppcg_scop and gpu_prog and free both immediately. Both will later be
filled with data from the polly::Scop and are needed to use PPCG for GPU
schedule generation. This commit does not yet perform any GPU code generation,
but ensures that the basic infrastructure has been put in place.
We also add a simple test case to ensure the new code is run and use this
opportunity to verify that GPU_CODEGEN tests are only run if GPU code generation
has been enabled in cmake.
llvm-svn: 275389
Benjamin Kramer [Thu, 14 Jul 2016 09:46:07 +0000 (09:46 +0000)]
[clang-rename] add documentation
clang-rename needs at least to have a minimum documentation to provide a
small introduction for new users
Patch by Kirill Bobyrev!
Differential Revision: http://reviews.llvm.org/D22129
llvm-svn: 275388
Benjamin Kramer [Thu, 14 Jul 2016 09:46:03 +0000 (09:46 +0000)]
[clang-rename] exit code-related bugfix and code cleanup
This patch does the following:
* enforces proper formatting for few files (i.e. deals with 80 linewidth violations and few other things)
* ensures '\n' chars are passed to the output streams instead of "\n" strings
* fixes a bug caused by calling cl::PrintHelpMessage(), which occasionally calls exit(0), so that exit(1) (which is right after cl::PrintHelpMessage line) becomes dead code
Patch by Kirill Bobyrev!
Differential Revision: http://reviews.llvm.org/D22091
llvm-svn: 275387
Haojian Wu [Thu, 14 Jul 2016 09:39:12 +0000 (09:39 +0000)]
[include-fixer] Correct an incorrecst judgement about prefix scoped qualifiers.
Summary:
The judgement that checks whether the fully-qualified name has scoped qualifiers
prefix is incorrect. Should always check whether the first matched postion is the
beginning position.
Reviewers: bkramer
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D22343
llvm-svn: 275386
Eugene Leviant [Thu, 14 Jul 2016 09:21:24 +0000 (09:21 +0000)]
[ELF] r275383 reverted due to buildbot failure
llvm-svn: 275385
Asaf Badouh [Thu, 14 Jul 2016 08:40:30 +0000 (08:40 +0000)]
[X86][AVX512F] minor fix of the parameter names
add "__" prefix
llvm-svn: 275384
Eugene Leviant [Thu, 14 Jul 2016 08:26:41 +0000 (08:26 +0000)]
[ELF] Allow overriding reserved symbols in linker scripts
llvm-svn: 275383
Sjoerd Meijer [Thu, 14 Jul 2016 07:44:20 +0000 (07:44 +0000)]
This implements a more optimal algorithm for selecting a base constant in
constant hoisting. It not only takes into account the number of uses and the
cost of expressions in which constants appear, but now also the resulting
integer range of the offsets. Thus, the algorithm maximizes the number of uses
within an integer range that will enable more efficient code generation. On
ARM, for example, this will enable code size optimisations because less
negative offsets will be created. Negative offsets/immediates are not supported
by Thumb1 thus preventing more compact instruction encoding.
Differential Revision: http://reviews.llvm.org/D21183
llvm-svn: 275382
Ilia K [Thu, 14 Jul 2016 07:43:14 +0000 (07:43 +0000)]
Fix -break-enable/-break-disable commands (MI)
* Previously -break-enable mistakenly set BP's enabled flag to false.
* These commands print fake =breakpoint-modified messages, what's not
needed anymore because that events are come in normal way.
* Add tests for -break-enable/-break-disable commands
Initial patch from xuefangliang@hotmail.com. The test case was improved by me.
Differential Revision: http://reviews.llvm.org/D21757
llvm-svn: 275381
David Majnemer [Thu, 14 Jul 2016 06:58:42 +0000 (06:58 +0000)]
[InstCombine] Masked loads with undef masks can fold to normal loads
We were able to fold masked loads with an all-ones mask to a normal
load. However, we couldn't turn a masked load with a mask with mixed
ones and undefs into a normal load.
llvm-svn: 275380
David Majnemer [Thu, 14 Jul 2016 06:58:37 +0000 (06:58 +0000)]
Simplify llvm.masked.load w/ undef masks
We can always pick the passthru value if the mask is undef: we are
permitted to treat the mask as-if it were filled with zeros.
llvm-svn: 275379
Craig Topper [Thu, 14 Jul 2016 06:41:34 +0000 (06:41 +0000)]
[AVX512] Implement EXTLOAD lowering with patterns to select existing VPMOVZX instructions instead of creating CodeGenOnly instructions.
llvm-svn: 275378
Dean Michael Berris [Thu, 14 Jul 2016 06:37:46 +0000 (06:37 +0000)]
Use hasFlag instead of hasArg
Summary: Fix the build to use hasFlag instead of hasArg for checking some flags.
Reviewers: echristo
Subscribers: mehdi_amini, cfe-commits
Differential Revision: http://reviews.llvm.org/D22338
llvm-svn: 275377
Eli Friedman [Thu, 14 Jul 2016 05:48:25 +0000 (05:48 +0000)]
[X86] Fix stupid typo in isel lowering.
Apparently someone miscounted the number of zeros in the immediate.
Fixes https://llvm.org/bugs/show_bug.cgi?id=28544 .
llvm-svn: 275376
Matt Arsenault [Thu, 14 Jul 2016 05:47:17 +0000 (05:47 +0000)]
AMDGPU/R600: Delete/rename intrinsics no longer used by mesa
Use the replacement pass to update the tests, and delete old names.
llvm-svn: 275375
Rui Ueyama [Thu, 14 Jul 2016 05:46:24 +0000 (05:46 +0000)]
Set sh_addralign to 1 instead of 0.
ELF spec says that alignment of 0 is equivalent to 1.
Previously, we arbitrary set to 0 or 1, but always setting to 1
makes our program simpler.
llvm-svn: 275374
Rui Ueyama [Thu, 14 Jul 2016 05:46:22 +0000 (05:46 +0000)]
Attempt to unbreak msan bot.
r275301 made .got section be aligned on Target->GotEntrySize,
so GotEntrySize must have been initialized. We didn't initialize
it for AMDGPU.
llvm-svn: 275373
Matt Arsenault [Thu, 14 Jul 2016 05:23:23 +0000 (05:23 +0000)]
AMDGPU/R600: Remove intrinsics with no tests and no users
Mesa removed this path, so nothing is using these anymore.
llvm-svn: 275372
Matt Arsenault [Thu, 14 Jul 2016 05:23:19 +0000 (05:23 +0000)]
AMDGPU: Remove unused intrinsics
llvm-svn: 275371
Matt Arsenault [Thu, 14 Jul 2016 05:23:15 +0000 (05:23 +0000)]
AMDGPU: Fix test not actually testing anything
It wasn't actually running the pass, and since it is
missing the llvm prefix, the eh intrinsic was not
really an IntrinsicInst.
Also add missing test for lifetime markers.
llvm-svn: 275370
Matt Arsenault [Thu, 14 Jul 2016 05:23:08 +0000 (05:23 +0000)]
AMDGPU: Remove dead code
llvm-svn: 275369
Dean Michael Berris [Thu, 14 Jul 2016 04:58:44 +0000 (04:58 +0000)]
Add C++ dependencies to xray runtime
Summary:
Depends on D21982 which implements the in-memory logging implementation of the
XRay runtime. These additional changes also depends on D20352 which adds the
bulk of XRay flags/dependencies when using the `-fxray-instrument` flag from
Clang.
Reviewers: echristo, rnk, aaron.ballman
Subscribers: mehdi_amini, cfe-commits
Differential Revision: http://reviews.llvm.org/D21983
llvm-svn: 275368
Dean Michael Berris [Thu, 14 Jul 2016 04:06:33 +0000 (04:06 +0000)]
XRay: Add entry and exit sleds
Summary:
In this patch we implement the following parts of XRay:
- Supporting a function attribute named 'function-instrument' which currently only supports 'xray-always'. We should be able to use this attribute for other instrumentation approaches.
- Supporting a function attribute named 'xray-instruction-threshold' used to determine whether a function is instrumented with a minimum number of instructions (IR instruction counts).
- X86-specific nop sleds as described in the white paper.
- A machine function pass that adds the different instrumentation marker instructions at a very late stage.
- A way of identifying which return opcode is considered "normal" for each architecture.
There are some caveats here:
1) We don't handle PATCHABLE_RET in platforms other than x86_64 yet -- this means if IR used PATCHABLE_RET directly instead of a normal ret, instruction lowering for that platform might do the wrong thing. We think this should be handled at instruction selection time to by default be unpacked for platforms where XRay is not availble yet.
2) The generated section for X86 is different from what is described from the white paper for the sole reason that LLVM allows us to do this neatly. We're taking the opportunity to deviate from the white paper from this perspective to allow us to get richer information from the runtime library.
Reviewers: sanjoy, eugenis, kcc, pcc, echristo, rnk
Subscribers: niravd, majnemer, atrick, rnk, emaste, bmakam, mcrosier, mehdi_amini, llvm-commits
Differential Revision: http://reviews.llvm.org/D19904
llvm-svn: 275367
Davide Italiano [Thu, 14 Jul 2016 03:02:34 +0000 (03:02 +0000)]
[SCCP] Pass a Value * instead of templating this function. NFC.
Thanks to Eli for the suggestion!
llvm-svn: 275366
Kelvin Li [Thu, 14 Jul 2016 02:54:56 +0000 (02:54 +0000)]
[OpenMP] Sema and parsing for 'target parallel for simd' pragma
This patch is to implement sema and parsing for 'target parallel for simd' pragma.
Differential Revision: http://reviews.llvm.org/D22096
llvm-svn: 275365
Chris Lattner [Thu, 14 Jul 2016 02:52:04 +0000 (02:52 +0000)]
clarify a bit.
llvm-svn: 275364
Davide Italiano [Thu, 14 Jul 2016 02:51:41 +0000 (02:51 +0000)]
[IPSCCP] Constant fold struct argument/instructions when all the lattice values are constant.
This now should also work with the interprocedural variant of the pass.
Slightly easier now that the yak is shaved.
Differential Revision: http://reviews.llvm.org/D22329
llvm-svn: 275363
Lang Hames [Thu, 14 Jul 2016 02:35:18 +0000 (02:35 +0000)]
[lld] Update LLD for Archive::child_iterator change in LLVM r275361.
llvm-svn: 275362
Lang Hames [Thu, 14 Jul 2016 02:24:01 +0000 (02:24 +0000)]
[Object] Re-apply r275316 now that I have the corresponding LLD patch ready.
llvm-svn: 275361
Nico Weber [Thu, 14 Jul 2016 01:52:51 +0000 (01:52 +0000)]
Teach fast isel about thiscall (and callee-pop) calls.
http://reviews.llvm.org/D22315
llvm-svn: 275360
Mehdi Amini [Thu, 14 Jul 2016 01:31:25 +0000 (01:31 +0000)]
[Scalarizer] PR28108: Skip over nullptr rather than crashing on it.
Summary:
In Scalarizer::gather we see if we already have a scattered form of Op,
and in that case use the new form.
In the particular case of PR28108, the found ValueVector SV has size 2,
where the first Value is nullptr, and the second is indeed a proper Value.
The nullptr then caused an assert to blow when we tried to do
cast<Instruction>(SV[I]).
With this patch we check SV[I] before doing the cast, and if it's nullptr
we just skip over it.
I don't know the Scalarizer well enough to know if this is the best fix
or if something should be done else where to prevent the nullptr from
being in the ValueVector at all, but at least this avoids the crash
and looking at the test case output it looks reasonable.
Reviewers: hfinkel, frasercrmck, wala, mehdi_amini
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D21518
llvm-svn: 275359
Mehdi Amini [Thu, 14 Jul 2016 01:31:20 +0000 (01:31 +0000)]
Add missing test for r275347 "[IPRA] Set callee saved registers to none for local function when IPRA is enabled."
llvm-svn: 275358
Davide Italiano [Thu, 14 Jul 2016 01:27:29 +0000 (01:27 +0000)]
[SCCP] Generalize tryToReplaceInstWithConstant to work also with arguments.
llvm-svn: 275357
Adrian Prantl [Thu, 14 Jul 2016 00:42:53 +0000 (00:42 +0000)]
Add a comment mirroring the one in LLVM's Dwarf.h
llvm-svn: 275356
Matthias Braun [Thu, 14 Jul 2016 00:42:37 +0000 (00:42 +0000)]
MIRParser: Fix MIRParser not reporting nullptr on error.
While some code paths in MIRParserImpl::parse() already returned nullptr
in case of error one of the important ones did not.
llvm-svn: 275355
Adrian Prantl [Thu, 14 Jul 2016 00:41:18 +0000 (00:41 +0000)]
Synchronize LLVM and clang's ObjCDeclSpec::ObjCPropertyAttributeKind.
This adds Clang-specific DWARF constants for nullability and ObjC
class properties that are already generated by clang. This patch adds
dwarfdump support and a more comprehensive testcase.
<rdar://problem/
27335745>
llvm-svn: 275354
Lang Hames [Thu, 14 Jul 2016 00:37:04 +0000 (00:37 +0000)]
[Object] Revert r275316, Archive::child_iterator changes, while I update lld.
Should fix the bots broken by r275316.
llvm-svn: 275353
David Majnemer [Thu, 14 Jul 2016 00:29:50 +0000 (00:29 +0000)]
[ConstantFolding] Fold masked loads
We can constant fold a masked load if the operands are appropriately
constant.
Differential Revision: http://reviews.llvm.org/D22324
llvm-svn: 275352
Richard Smith [Thu, 14 Jul 2016 00:14:59 +0000 (00:14 +0000)]
www/cxx_status: give more precise links to initialization order wording
llvm-svn: 275351
Richard Smith [Thu, 14 Jul 2016 00:11:03 +0000 (00:11 +0000)]
P0305R0: Semantic analysis and code generation for C++17 init-statement for 'if' and 'switch':
if (stmt; condition) { ... }
Patch by Anton Bikineev! Some minor formatting and comment tweets by me.
llvm-svn: 275350
Justin Lebar [Wed, 13 Jul 2016 23:52:19 +0000 (23:52 +0000)]
Force a semicolon at the end of the LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE() macro.
This silences a warning about an extra semicolon on gcc.
llvm-svn: 275349
Mehdi Amini [Wed, 13 Jul 2016 23:39:46 +0000 (23:39 +0000)]
Add EnableIPRA to TargetOptions, and move the cl::opt -enable-ipra to TargetMachine.cpp
Avoid exposing a cl::opt in a public header and instead promote this
option in the API.
Alternatively, we could land the cl::opt in CommandFlags.h so that
it is available to every tool, but we would still have to find an
option for clang.
llvm-svn: 275348
Mehdi Amini [Wed, 13 Jul 2016 23:39:34 +0000 (23:39 +0000)]
[IPRA] Set callee saved registers to none for local function when IPRA is enabled.
IPRA try to optimize caller saved register by propagating register
usage information from callee to caller so it is beneficial to have
caller saved registers compare to callee saved registers when IPRA
is enabled. Please find more detailed explanation here
https://groups.google.com/d/msg/llvm-dev/XRzGhJ9wtZg/tjAJqb0eEgAJ.
This change makes local function do not have any callee preserved
register when IPRA is enabled. A simple test case is also added to
verify this change.
Patch by Vivek Pandya <vivekvpandya@gmail.com>
Differential Revision: http://reviews.llvm.org/D21561
llvm-svn: 275347
Sanjoy Das [Wed, 13 Jul 2016 23:33:20 +0000 (23:33 +0000)]
[JumpThreading] Delete commented out debug code; NFC
llvm-svn: 275346
David Majnemer [Wed, 13 Jul 2016 23:33:07 +0000 (23:33 +0000)]
[ConstantFolding] Extend FoldReinterpretLoadFromConstPtr to handle negative offsets
Treat loads which clip before the start of a global initializer the same
way we treat clipping beyond the end of the initializer: use zeros.
llvm-svn: 275345
David Majnemer [Wed, 13 Jul 2016 23:32:53 +0000 (23:32 +0000)]
Move a transform from InstCombine to InstSimplify.
This transform doesn't require any new instructions, it can safely live
in InstSimplify.
llvm-svn: 275344
Michael Kuperstein [Wed, 13 Jul 2016 23:28:00 +0000 (23:28 +0000)]
Fix copy/paste bug in r275340.
llvm-svn: 275343
Matthias Braun [Wed, 13 Jul 2016 23:27:50 +0000 (23:27 +0000)]
MIRParser: Move SlotMapping and SourceMgr refs to PFS; NFC
Code cleanup: Move references to SlotMapping and SourceMgr into the
PerFunctionMIParsingState to avoid unnecessary passing around in
parameters.
llvm-svn: 275342
Michael Kuperstein [Wed, 13 Jul 2016 23:23:40 +0000 (23:23 +0000)]
[DAG] Correctly chain masked loads
If a masked loads is not added to the chain, it should not reset the chain's
root.
This fixes the remaining part of PR28515.
llvm-svn: 275340
Davide Italiano [Wed, 13 Jul 2016 23:20:04 +0000 (23:20 +0000)]
[SCCP] Have the logic for replacing insts with constant in a single place.
The code was pretty much copy-pasted between SCCP and IPSCCP. The situation
became clearly worse after I introduced the support for folding structs in
SCCP. This commit is NFC as we currently (still) skip the replacement
step in IPSCCP, but I'll change this soon.
llvm-svn: 275339
Vedant Kumar [Wed, 13 Jul 2016 23:12:26 +0000 (23:12 +0000)]
[Coverage] Return an ArrayRef to avoid copies (NFC)
llvm-svn: 275338
Vedant Kumar [Wed, 13 Jul 2016 23:12:23 +0000 (23:12 +0000)]
[Coverage] Mark a few methods const (NFC)
llvm-svn: 275337
Greg Clayton [Wed, 13 Jul 2016 22:38:54 +0000 (22:38 +0000)]
Added test for setting breakpoints by basename and fullname.
<rdar://problem/
24599697>
llvm-svn: 275336
Adam Nemet [Wed, 13 Jul 2016 22:36:35 +0000 (22:36 +0000)]
[LAA] Don't hold on to DominatorTree in the analysis result
llvm-svn: 275335
Adam Nemet [Wed, 13 Jul 2016 22:36:27 +0000 (22:36 +0000)]
[LAA] Don't hold on to TargetLibraryInfo in the analysis result
llvm-svn: 275334