SuccessChanges

Summary

  1. AArch64: fix weird edge case in ABI. It turns out there are some sort-of-but-not-quite empty structs that break all the rules. For example: struct SuperEmpty { int arr[0]; }; struct SortOfEmpty { struct SuperEmpty e; }; Both of these have sizeof == 0, even in C++ mode, for GCC compatibility. The first one also doesn't occupy a register when passed by value in GNU C++ mode, unlike everything else. On Darwin, we want to ignore the lot (and especially don't want to try to use an i0 as we were).
  2. Permit keywords in module names in #pragma clang module *. This is necessary to be able to build a libc++ module from preprocessed source (due to the submodule std.new).
  3. Fix spelling error in command line option description. NFC
  4. [IR] Fix some Clang-tidy modernize-use-using warnings; other minor fixes (NFC).
  5. Add support for building modules from preprocessed source. To support this, an optional marker "#pragma clang module contents" is recognized in module map files, and the rest of the module map file from that point onwards is treated as the source of the module. Preprocessing a module map produces the input module followed by the marker and then the preprocessed contents of the module. Ignoring line markers, a preprocessed module might look like this: module A { header "a.h" } #pragma clang module contents #pragma clang module begin A // ... a.h ... #pragma clang module end The preprocessed output generates line markers, which are not accepted by the module map parser, so -x c++-module-map-cpp-output should be used to compile such outputs. A couple of major parts do not work yet: 1) The files that are listed in the module map must exist on disk, in order to build the on-disk header -> module lookup table in the PCM file. To fix this, we need the preprocessed output to track the file size and other stat information we might use to build the lookup table. 2) Declaration ownership semantics don't work properly yet, since mapping from a source location to a module relies on mapping from FileIDs to modules, which we can't do if module transitions can occur in the middle of a file.
  6. Override invalidate of ProfileSummaryInfo to return false. Differential revision: https://reviews.llvm.org/D32775
  7. [Hexagon] Disable predicated calls by default
  8. [Hexagon] Remove C6 and C7 as separate registers These are M0 and M1. Removing duplicated registers reduces the number of explicit register aliasing.
  9. [RDF] Remove covered parts of reached uses for phi and use in same block
  10. lld Fixups for TypeDatabase changes.
  11. ARM: Compute MaxCallFrame size early This exposes a method in MachineFrameInfo that calculates MaxCallFrameSize and calls it after instruction selection in the ARM target. This avoids ARMBaseRegisterInfo::canRealignStack()/ARMFrameLowering::hasReservedCallFrame() giving different answers in early/late phases of codegen. The testcase shows a particular nasty example result of that where we would fail to properly align an alloca. Differential Revision: https://reviews.llvm.org/D32622
  12. [CodeView] Reserve TypeDatabase records up front. Most of the time we know exactly how many type records we have in a list, and we want to use the visitor to deserialize them into actual records in a database. Previously we were just using push_back() every time without reserving the space up front in the vector. This is obviously terrible from a performance standpoint, and it's not uncommon to have PDB files with half a million type records, where the performance degredation was quite noticeable.
Revision 302313 by Tim Northover:
AArch64: fix weird edge case in ABI.

It turns out there are some sort-of-but-not-quite empty structs that break all
the rules. For example:

struct SuperEmpty { int arr[0]; };
struct SortOfEmpty { struct SuperEmpty e; };

Both of these have sizeof == 0, even in C++ mode, for GCC compatibility. The
first one also doesn't occupy a register when passed by value in GNU C++ mode,
unlike everything else.

On Darwin, we want to ignore the lot (and especially don't want to try to use
an i0 as we were).
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/lib/CodeGen/TargetInfo.cpp (diff)llvm-revision.src/cfe/trunk/lib/CodeGen/TargetInfo.cpp
The file was added/cfe/trunk/test/CodeGen/aarch64-args.cppllvm-revision.src/cfe/trunk/test/CodeGen/aarch64-args.cpp
Revision 302312 by rsmith:
Permit keywords in module names in #pragma clang module *.

This is necessary to be able to build a libc++ module from preprocessed source
(due to the submodule std.new).
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/lib/Lex/Pragma.cpp (diff)llvm-revision.src/cfe/trunk/lib/Lex/Pragma.cpp
The file was modified/cfe/trunk/test/Preprocessor/pragma_module.c (diff)llvm-revision.src/cfe/trunk/test/Preprocessor/pragma_module.c
Revision 302311 by ctopper:
Fix spelling error in command line option description. NFC
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp (diff)llvm-revision.src/llvm/trunk/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp
Revision 302310 by eugenezelenko:
[IR] Fix some Clang-tidy modernize-use-using warnings; other minor fixes (NFC).
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/IR/Attributes.h (diff)llvm-revision.src/llvm/trunk/include/llvm/IR/Attributes.h
The file was modified/llvm/trunk/include/llvm/IR/BasicBlock.h (diff)llvm-revision.src/llvm/trunk/include/llvm/IR/BasicBlock.h
The file was modified/llvm/trunk/include/llvm/IR/CFG.h (diff)llvm-revision.src/llvm/trunk/include/llvm/IR/CFG.h
The file was modified/llvm/trunk/include/llvm/IR/CallSite.h (diff)llvm-revision.src/llvm/trunk/include/llvm/IR/CallSite.h
The file was modified/llvm/trunk/include/llvm/IR/CallingConv.h (diff)llvm-revision.src/llvm/trunk/include/llvm/IR/CallingConv.h
The file was modified/llvm/trunk/include/llvm/IR/DataLayout.h (diff)llvm-revision.src/llvm/trunk/include/llvm/IR/DataLayout.h
The file was modified/llvm/trunk/include/llvm/IR/DebugInfo.h (diff)llvm-revision.src/llvm/trunk/include/llvm/IR/DebugInfo.h
The file was modified/llvm/trunk/include/llvm/IR/Dominators.h (diff)llvm-revision.src/llvm/trunk/include/llvm/IR/Dominators.h
The file was modified/llvm/trunk/include/llvm/IR/InlineAsm.h (diff)llvm-revision.src/llvm/trunk/include/llvm/IR/InlineAsm.h
The file was modified/llvm/trunk/include/llvm/IR/InstIterator.h (diff)llvm-revision.src/llvm/trunk/include/llvm/IR/InstIterator.h
The file was modified/llvm/trunk/include/llvm/IR/InstrTypes.h (diff)llvm-revision.src/llvm/trunk/include/llvm/IR/InstrTypes.h
The file was modified/llvm/trunk/lib/IR/DataLayout.cpp (diff)llvm-revision.src/llvm/trunk/lib/IR/DataLayout.cpp
The file was modified/llvm/trunk/lib/IR/DebugInfo.cpp (diff)llvm-revision.src/llvm/trunk/lib/IR/DebugInfo.cpp
Revision 302309 by rsmith:
Add support for building modules from preprocessed source.

To support this, an optional marker "#pragma clang module contents" is
recognized in module map files, and the rest of the module map file from that
point onwards is treated as the source of the module. Preprocessing a module
map produces the input module followed by the marker and then the preprocessed
contents of the module.

Ignoring line markers, a preprocessed module might look like this:

  module A {
    header "a.h"
  }
  #pragma clang module contents
  #pragma clang module begin A
  // ... a.h ...
  #pragma clang module end

The preprocessed output generates line markers, which are not accepted by the
module map parser, so -x c++-module-map-cpp-output should be used to compile
such outputs.

A couple of major parts do not work yet:

1) The files that are listed in the module map must exist on disk, in order to
   build the on-disk header -> module lookup table in the PCM file. To fix
   this, we need the preprocessed output to track the file size and other stat
   information we might use to build the lookup table.

2) Declaration ownership semantics don't work properly yet, since mapping from
   a source location to a module relies on mapping from FileIDs to modules,
   which we can't do if module transitions can occur in the middle of a file.
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/include/clang/Frontend/FrontendAction.h (diff)llvm-revision.src/cfe/trunk/include/clang/Frontend/FrontendAction.h
The file was modified/cfe/trunk/include/clang/Lex/HeaderSearch.h (diff)llvm-revision.src/cfe/trunk/include/clang/Lex/HeaderSearch.h
The file was modified/cfe/trunk/include/clang/Lex/ModuleMap.h (diff)llvm-revision.src/cfe/trunk/include/clang/Lex/ModuleMap.h
The file was modified/cfe/trunk/lib/Frontend/FrontendAction.cpp (diff)llvm-revision.src/cfe/trunk/lib/Frontend/FrontendAction.cpp
The file was modified/cfe/trunk/lib/Frontend/FrontendActions.cpp (diff)llvm-revision.src/cfe/trunk/lib/Frontend/FrontendActions.cpp
The file was modified/cfe/trunk/lib/Frontend/Rewrite/FrontendActions.cpp (diff)llvm-revision.src/cfe/trunk/lib/Frontend/Rewrite/FrontendActions.cpp
The file was modified/cfe/trunk/lib/Lex/HeaderSearch.cpp (diff)llvm-revision.src/cfe/trunk/lib/Lex/HeaderSearch.cpp
The file was modified/cfe/trunk/lib/Lex/ModuleMap.cpp (diff)llvm-revision.src/cfe/trunk/lib/Lex/ModuleMap.cpp
The file was modified/cfe/trunk/lib/Sema/SemaDecl.cpp (diff)llvm-revision.src/cfe/trunk/lib/Sema/SemaDecl.cpp
The file was modified/cfe/trunk/test/Modules/preprocess-module.cpp (diff)llvm-revision.src/cfe/trunk/test/Modules/preprocess-module.cpp
Revision 302308 by eraman:
Override invalidate of ProfileSummaryInfo to return false.

Differential revision: https://reviews.llvm.org/D32775
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/Analysis/ProfileSummaryInfo.h (diff)llvm-revision.src/llvm/trunk/include/llvm/Analysis/ProfileSummaryInfo.h
Revision 302307 by kparzysz:
[Hexagon] Disable predicated calls by default
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/Hexagon/HexagonInstrInfo.cpp (diff)llvm-revision.src/llvm/trunk/lib/Target/Hexagon/HexagonInstrInfo.cpp
The file was modified/llvm/trunk/lib/Target/Hexagon/HexagonSubtarget.cpp (diff)llvm-revision.src/llvm/trunk/lib/Target/Hexagon/HexagonSubtarget.cpp
The file was modified/llvm/trunk/lib/Target/Hexagon/HexagonSubtarget.h (diff)llvm-revision.src/llvm/trunk/lib/Target/Hexagon/HexagonSubtarget.h
Revision 302306 by kparzysz:
[Hexagon] Remove C6 and C7 as separate registers

These are M0 and M1. Removing duplicated registers reduces the number
of explicit register aliasing.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/Hexagon/Disassembler/HexagonDisassembler.cpp (diff)llvm-revision.src/llvm/trunk/lib/Target/Hexagon/Disassembler/HexagonDisassembler.cpp
The file was modified/llvm/trunk/lib/Target/Hexagon/HexagonRegisterInfo.td (diff)llvm-revision.src/llvm/trunk/lib/Target/Hexagon/HexagonRegisterInfo.td
The file was modified/llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonMCCodeEmitter.cpp (diff)llvm-revision.src/llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonMCCodeEmitter.cpp
Revision 302305 by kparzysz:
[RDF] Remove covered parts of reached uses for phi and use in same block
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/Hexagon/RDFLiveness.cpp (diff)llvm-revision.src/llvm/trunk/lib/Target/Hexagon/RDFLiveness.cpp
The file was modified/llvm/trunk/lib/Target/Hexagon/RDFRegisters.cpp (diff)llvm-revision.src/llvm/trunk/lib/Target/Hexagon/RDFRegisters.cpp
The file was modified/llvm/trunk/lib/Target/Hexagon/RDFRegisters.h (diff)llvm-revision.src/llvm/trunk/lib/Target/Hexagon/RDFRegisters.h
The file was added/llvm/trunk/test/CodeGen/Hexagon/rdf-cover-use.llllvm-revision.src/llvm/trunk/test/CodeGen/Hexagon/rdf-cover-use.ll
Revision 302304 by zturner:
lld Fixups for TypeDatabase changes.
Change TypePath in RepositoryPath in Workspace
The file was modified/lld/trunk/COFF/PDB.cpp (diff)llvm-revision.src/lld/trunk/COFF/PDB.cpp
Revision 302303 by matze:
ARM: Compute MaxCallFrame size early

This exposes a method in MachineFrameInfo that calculates
MaxCallFrameSize and calls it after instruction selection in the ARM
target.

This avoids
ARMBaseRegisterInfo::canRealignStack()/ARMFrameLowering::hasReservedCallFrame()
giving different answers in early/late phases of codegen.

The testcase shows a particular nasty example result of that where we
would fail to properly align an alloca.

Differential Revision: https://reviews.llvm.org/D32622
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/CodeGen/MachineFrameInfo.h (diff)llvm-revision.src/llvm/trunk/include/llvm/CodeGen/MachineFrameInfo.h
The file was modified/llvm/trunk/lib/CodeGen/GlobalISel/IRTranslator.cpp (diff)llvm-revision.src/llvm/trunk/lib/CodeGen/GlobalISel/IRTranslator.cpp
The file was modified/llvm/trunk/lib/CodeGen/GlobalISel/InstructionSelect.cpp (diff)llvm-revision.src/llvm/trunk/lib/CodeGen/GlobalISel/InstructionSelect.cpp
The file was modified/llvm/trunk/lib/CodeGen/MachineFrameInfo.cpp (diff)llvm-revision.src/llvm/trunk/lib/CodeGen/MachineFrameInfo.cpp
The file was modified/llvm/trunk/lib/CodeGen/MachineVerifier.cpp (diff)llvm-revision.src/llvm/trunk/lib/CodeGen/MachineVerifier.cpp
The file was modified/llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp (diff)llvm-revision.src/llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp
The file was modified/llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp (diff)llvm-revision.src/llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp
The file was modified/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (diff)llvm-revision.src/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
The file was modified/llvm/trunk/lib/Target/ARM/ARMISelLowering.h (diff)llvm-revision.src/llvm/trunk/lib/Target/ARM/ARMISelLowering.h
The file was added/llvm/trunk/test/CodeGen/ARM/alloca-align.llllvm-revision.src/llvm/trunk/test/CodeGen/ARM/alloca-align.ll
Revision 302302 by zturner:
[CodeView] Reserve TypeDatabase records up front.

Most of the time we know exactly how many type records we
have in a list, and we want to use the visitor to deserialize
them into actual records in a database.  Previously we were
just using push_back() every time without reserving the space
up front in the vector.  This is obviously terrible from a
performance standpoint, and it's not uncommon to have PDB
files with half a million type records, where the performance
degredation was quite noticeable.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/DebugInfo/CodeView/TypeDatabase.h (diff)llvm-revision.src/llvm/trunk/include/llvm/DebugInfo/CodeView/TypeDatabase.h
The file was modified/llvm/trunk/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp (diff)llvm-revision.src/llvm/trunk/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
The file was modified/llvm/trunk/lib/DebugInfo/CodeView/TypeDatabase.cpp (diff)llvm-revision.src/llvm/trunk/lib/DebugInfo/CodeView/TypeDatabase.cpp
The file was modified/llvm/trunk/tools/llvm-pdbdump/Analyze.cpp (diff)llvm-revision.src/llvm/trunk/tools/llvm-pdbdump/Analyze.cpp
The file was modified/llvm/trunk/tools/llvm-pdbdump/LLVMOutputStyle.cpp (diff)llvm-revision.src/llvm/trunk/tools/llvm-pdbdump/LLVMOutputStyle.cpp
The file was modified/llvm/trunk/tools/llvm-readobj/COFFDumper.cpp (diff)llvm-revision.src/llvm/trunk/tools/llvm-readobj/COFFDumper.cpp