SuccessChanges

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

Summary

  1. [clang][driver][NFC][obvious] Remove obsolete unistd.h include (details)
  2. [WebAssembly] call_indirect issues table number relocs (details)
  3. [WebAssembly] Change prefix on data segment flags to WASM_DATA_SEGMENT (details)
  4. [clang][cli] Parse Lang and CodeGen options separately (details)
  5. [X86][AMX] Fix the typo. (details)
  6. [NFC] Make remaining cost functions in LoopVectorize.cpp use InstructionCost (details)
Commit b86e7ae66cb988dda33445c29fa64f93e7ca9c3c by tbaeder
[clang][driver][NFC][obvious] Remove obsolete unistd.h include

getuid() is not being called in this file anymore.
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
Commit 418df4a6ab35d343cc0f2608c90a73dd9b8d0ab1 by wingo
[WebAssembly] call_indirect issues table number relocs

This patch changes to make call_indirect explicitly refer to the
corresponding function table, residualizing TABLE_NUMBER relocs against
it.

With this change, wasm-ld now sees all references to tables, and can
link multiple tables.

Differential Revision: https://reviews.llvm.org/D90948
The file was modifiedllvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.h
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp
The file was addedllvm/test/MC/WebAssembly/call-indirect-relocs.s
The file was modifiedllvm/test/MC/WebAssembly/type-index.s
The file was modifiedllvm/lib/MC/WasmObjectWriter.cpp
The file was modifiedlld/test/wasm/compress-relocs.ll
The file was modifiedllvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyInstPrinter.cpp
The file was modifiedllvm/test/MC/WebAssembly/reloc-code.ll
The file was modifiedllvm/test/MC/WebAssembly/tail-call-encodings.s
The file was modifiedllvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyFastISel.cpp
The file was modifiedllvm/test/CodeGen/WebAssembly/multivalue.ll
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyInstrCall.td
The file was modifiedlld/test/wasm/shared.ll
The file was modifiedllvm/test/MC/WebAssembly/basic-assembly.s
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
The file was modifiedllvm/test/MC/WebAssembly/weak-alias.s
The file was modifiedlld/test/wasm/call-indirect.ll
The file was modifiedllvm/test/CodeGen/WebAssembly/function-pointer64.ll
Commit 831a143e50cac873ec095fc7139a485173ba8c35 by wingo
[WebAssembly] Change prefix on data segment flags to WASM_DATA_SEGMENT

Element sections will also need flags, so we shouldn't squat the
WASM_SEGMENT namespace.

Depends on D90948.

Differential Revision: https://reviews.llvm.org/D92315
The file was modifiedllvm/lib/ObjectYAML/WasmYAML.cpp
The file was modifiedllvm/lib/Object/WasmObjectFile.cpp
The file was modifiedllvm/lib/MC/WasmObjectWriter.cpp
The file was modifiedlld/wasm/OutputSections.cpp
The file was modifiedlld/wasm/Writer.cpp
The file was modifiedllvm/include/llvm/BinaryFormat/Wasm.h
The file was modifiedllvm/lib/ObjectYAML/WasmEmitter.cpp
Commit 39a2a233f88443e865758ba73c156787c77ead2c by jan_svoboda
[clang][cli] Parse Lang and CodeGen options separately

This patch moves the parsing of `{Lang,CodeGen}Options` from `parseSimpleArgs` to the original `Parse{Lang,CodeGen}Args` functions.

This ensures all marshalled `LangOptions` are being parsed **after** the call `setLangDefaults`, which in turn enables us to marshall `LangOptions` that somehow depend on the defaults. (In a future patch.)

Now, `CodeGenOptions` need to be parsed **after** `LangOptions`, because `-cl-mad-enable` (a `CodeGenOpt`) depends on the value of `-cl-fast-relaxed-math` and `-cl-unsafe-math-optimizations` (`LangOpts`).

Unfortunately, this removes the nice property that marshalled options get parsed in the exact order they appear in the `.td` file. Now we cannot be sure that a TableGen record referenced in `ImpliedByAnyOf` has already been parsed. This might cause an ordering issues (i.e. reading value of uninitialized variable). I plan to mitigate this by moving each `XxxOpt` group from `parseSimpleArgs` back to their original parsing function. With this setup, if an option from group `A` references option from group `B` in TableGen, the compiler will require us to make the `CompilerInvocation` member for `B` visible in the parsing function for `A`. That's where we notice that `B` didn't get parsed yet.

Reviewed By: Bigcheese

Differential Revision: https://reviews.llvm.org/D94682
The file was modifiedclang/include/clang/Driver/Options.td
The file was modifiedclang/test/Frontend/diagnostics-order.c
The file was modifiedclang/lib/Frontend/CompilerInvocation.cpp
The file was modifiedclang/include/clang/Frontend/CompilerInvocation.h
Commit 7e1d2224b42b411acf2d3cb20e3cf5a564ef79bb by yuanke.luo
[X86][AMX] Fix the typo.

The dpbsud should be dpbssd.

Differential Revision: https://reviews.llvm.org/D94943
The file was modifiedclang/lib/Headers/amxintrin.h
The file was modifiedclang/test/CodeGen/X86/amx_api.c
Commit c3ce2627949eee3b5d3012db78f670919a49b35d by david.sherwood
[NFC] Make remaining cost functions in LoopVectorize.cpp use InstructionCost

A previous patch has already changed getInstructionCost to return
an InstructionCost type. This patch changes the other various
getXXXCost functions to return an InstructionCost too. This is a
non-functional change - I've added a few asserts that the costs
are valid in places where we're selecting between vector call
and intrinsic costs. However, since we don't yet return invalid
costs from any of the TTI implementations these asserts should
not fire.

See this patch for the introduction of the type: https://reviews.llvm.org/D91174
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2020-November/146408.html

Differential Revision: https://reviews.llvm.org/D94065
The file was modifiedllvm/lib/Transforms/Vectorize/LoopVectorize.cpp