Changes from Git (git http://labmaster3.local/git/llvm-project.git)


  1. [MCA][InstrBuilder] Correctly mark reserved resources in initializeUsedResources. (details)
  2. [AssumeBundles] Remove non-determinisme from assume builder (details)
  3. [X86] Add a few more shuffles to hasUndefRegUpdate. (details)
  4. [gcov] Delete CC1 option -coverage-no-function-names-in-data (details)
Commit 47b95d7cf462b824b2fbea1eb1a64e9c3eaa1a95 by andrea.dibiagio
[MCA][InstrBuilder] Correctly mark reserved resources in initializeUsedResources.

This fixes a bug reported by Alex Renda on LLVMDev where mca did not correctly
mark a resource group as "reserved".

The issue was caused by a wrong check in function `initializeUsedResources`.
As a consequence of this, a resource group was left unreserved, and its field
`NumUnits` incorrectly reported an unrealistic number of consumed resource

This patch fixes the issue with the handling of reserved resources in the
InstrBuilder class, and adds a simple test for it.  Ideally, as suggested by
Andy Trick, most of these problems will disappear if in the future we will
introduce a (optional) DelayCycles vector for SchedWriteRes.
The file was modifiedllvm/lib/MCA/InstrBuilder.cpp
The file was addedllvm/test/tools/llvm-mca/X86/Haswell/reserved-resources.s
Commit 5957e058e41c90503d0fcaf595707f627042c218 by tyker
[AssumeBundles] Remove non-determinisme from assume builder

The assume builder was non-deterministic when working on unamed values.
this patch fixes this.

Reviewers: jdoerfert

Reviewed By: jdoerfert

Subscribers: hiraditya, mgrang, llvm-commits

Tags: #llvm

Differential Revision:
The file was modifiedllvm/lib/Transforms/Utils/AssumeBundleBuilder.cpp
The file was modifiedllvm/test/Transforms/LICM/pr23608.ll
The file was modifiedllvm/test/Transforms/Util/assume-builder.ll
The file was modifiedllvm/test/Transforms/NewGVN/2007-07-26-PhiErasure.ll
Commit e4c454b065be3b884b09fe7c0043f4445bdbd585 by craig.topper
[X86] Add a few more shuffles to hasUndefRegUpdate.

Mostly found by asserting on tests that have undef operands. I'm
sure this isn't an exhaustive list.
The file was modifiedllvm/lib/Target/X86/X86InstrInfo.cpp
The file was modifiedllvm/test/CodeGen/X86/vector-idiv-v2i32.ll
The file was modifiedllvm/test/CodeGen/X86/mmx-build-vector.ll
The file was modifiedllvm/test/CodeGen/X86/vector-shuffle-512-v8.ll
Commit 13a633b438b6500ecad9e4f936ebadf3411d0f44 by maskray
[gcov] Delete CC1 option -coverage-no-function-names-in-data

rL144865 incorrectly wrote function names for GCOV_TAG_FUNCTION
(this might be part of the reasons the header says
"We emit files in a corrupt version of GCOV's "gcda" file format").

rL176173 and rL177475 realized the problem and introduced -coverage-no-function-names-in-data
to work around the issue. (However, the description is wrong.
libgcov never writes function names, even before GCC 4.2).

In reality, the linker command line has to look like:

clang --coverage -Xclang -coverage-version='407*' -Xclang -coverage-cfg-checksum -Xclang -coverage-no-function-names-in-data

Failing to pass -coverage-no-function-names-in-data can make gcov 4.7~7
either produce wrong results (for one gcov-4.9 program, I see "No executable lines")
or segfault (gcov-7).
(gcov-8 uses an incompatible format.)

This patch deletes -coverage-no-function-names-in-data and the related
function names support from libclang_rt.profile
The file was modifiedclang/include/clang/Driver/
The file was modifiedclang/include/clang/Basic/CodeGenOptions.def
The file was modifiedclang/lib/CodeGen/BackendUtil.cpp
The file was modifiedllvm/include/llvm/Transforms/Instrumentation.h
The file was modifiedclang/lib/Frontend/CompilerInvocation.cpp
The file was modifiedllvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
The file was modifiedcompiler-rt/lib/profile/GCDAProfiling.c
The file was modifiedclang/test/CodeGen/code-coverage.c
The file was modifiedllvm/test/Transforms/GCOVProfiling/function-numbering.ll