[PATCH] D64931: Change X86 datalayout for three address spaces that specify pointer sizes.

Amy Huang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 18 09:47:51 PDT 2019


akhuang created this revision.
akhuang added a reviewer: rnk.
Herald added subscribers: llvm-commits, cfe-commits, sanjoy, arphaman, dexonsmith, steven_wu, hiraditya, mehdi_amini, dschuff.
Herald added projects: clang, LLVM.

This patch modifies the data layout for the X86 target. This is for an upcoming change that adds three new address spaces which will be used to implement the microsoft extensions __ptr32, __ptr64, __sptr, and __uptr. The address spaces specify whether a pointer is 32 bit sign extended, 32 bit zero extended, or 64 bit.

The numbers 253, 254, 255 are more or less arbitrary; I picked them because they're near 256-258, which are the current existing address spaces.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D64931

Files:
  clang/lib/Basic/Targets/OSTargets.h
  clang/lib/Basic/Targets/X86.h
  clang/test/CodeGen/iamcu-abi.c
  clang/test/CodeGen/target-data.c
  clang/test/CodeGen/thinlto-diagnostic-handler-remarks-with-hotness.ll
  clang/test/CodeGen/thinlto-distributed-cfi-devirt.ll
  clang/test/CodeGen/thinlto-distributed-cfi.ll
  clang/test/CodeGen/thinlto-distributed.ll
  clang/test/CodeGen/thinlto-multi-module.ll
  clang/test/CodeGen/thinlto_backend.ll
  clang/test/CodeGen/thinlto_backend_local_name_conflict.ll
  llvm/lib/Target/X86/X86TargetMachine.cpp
  llvm/test/Analysis/BasicAA/bug.23626.ll
  llvm/test/Analysis/BasicAA/pr31761.ll
  llvm/test/Analysis/GlobalsModRef/memset-escape.ll
  llvm/test/Analysis/GlobalsModRef/no-escape.ll
  llvm/test/Analysis/LoopAccessAnalysis/backward-dep-different-types.ll
  llvm/test/Analysis/LoopAccessAnalysis/forward-loop-carried.ll
  llvm/test/Analysis/LoopAccessAnalysis/forward-loop-independent.ll
  llvm/test/Analysis/LoopAccessAnalysis/memcheck-for-loop-invariant.ll
  llvm/test/Analysis/LoopAccessAnalysis/non-wrapping-pointer.ll
  llvm/test/Analysis/LoopAccessAnalysis/nullptr.ll
  llvm/test/Analysis/LoopAccessAnalysis/pointer-with-unknown-bounds.ll
  llvm/test/Analysis/LoopAccessAnalysis/resort-to-memchecks-only.ll
  llvm/test/Analysis/LoopAccessAnalysis/safe-no-checks.ll
  llvm/test/Analysis/LoopAccessAnalysis/safe-with-dep-distance.ll
  llvm/test/Analysis/LoopAccessAnalysis/underlying-objects-1.ll
  llvm/test/Analysis/LoopAccessAnalysis/underlying-objects-2.ll
  llvm/test/Analysis/LoopAccessAnalysis/unsafe-and-rt-checks-convergent.ll
  llvm/test/Analysis/LoopAccessAnalysis/unsafe-and-rt-checks.ll
  llvm/test/Analysis/LoopAccessAnalysis/wrapping-pointer-versioning.ll
  llvm/test/Analysis/ScalarEvolution/ZeroStep.ll
  llvm/test/Analysis/ScalarEvolution/expander-replace-congruent-ivs.ll
  llvm/test/Analysis/ScalarEvolution/pr24757.ll
  llvm/test/Bitcode/DIGlobalVariableExpression2.ll
  llvm/test/Bitcode/DINamespace.ll
  llvm/test/Bitcode/Inputs/module_hash.ll
  llvm/test/Bitcode/drop-debug-info.3.5.ll
  llvm/test/Bitcode/module_hash.ll
  llvm/test/LTO/Resolution/X86/Inputs/alias-1.ll
  llvm/test/LTO/Resolution/X86/Inputs/alias-alias-1.ll
  llvm/test/LTO/Resolution/X86/Inputs/appending-var-2.ll
  llvm/test/LTO/Resolution/X86/Inputs/comdat-mixed-lto.ll
  llvm/test/LTO/Resolution/X86/Inputs/comdat.ll
  llvm/test/LTO/Resolution/X86/Inputs/common2.ll
  llvm/test/LTO/Resolution/X86/Inputs/commons.ll
  llvm/test/LTO/Resolution/X86/Inputs/dead-strip-alias.ll
  llvm/test/LTO/Resolution/X86/Inputs/dead-strip-fulllto.ll
  llvm/test/LTO/Resolution/X86/Inputs/intrinsic.ll
  llvm/test/LTO/Resolution/X86/Inputs/link-odr-availextern-ae.ll
  llvm/test/LTO/Resolution/X86/Inputs/link-odr-availextern-odr.ll
  llvm/test/LTO/Resolution/X86/Inputs/mixed_lto.ll
  llvm/test/LTO/Resolution/X86/Inputs/mod-asm-used.ll
  llvm/test/LTO/Resolution/X86/Inputs/not-prevailing.ll
  llvm/test/LTO/Resolution/X86/alias-alias.ll
  llvm/test/LTO/Resolution/X86/alias.ll
  llvm/test/LTO/Resolution/X86/appending-var.ll
  llvm/test/LTO/Resolution/X86/asm-output.ll
  llvm/test/LTO/Resolution/X86/available-externally.ll
  llvm/test/LTO/Resolution/X86/cache-dso-local.ll
  llvm/test/LTO/Resolution/X86/cache-dso-local2.ll
  llvm/test/LTO/Resolution/X86/cache-prevailing.ll
  llvm/test/LTO/Resolution/X86/comdat-mixed-lto.ll
  llvm/test/LTO/Resolution/X86/comdat.ll
  llvm/test/LTO/Resolution/X86/common2.ll
  llvm/test/LTO/Resolution/X86/commons.ll
  llvm/test/LTO/Resolution/X86/dead-strip-alias.ll
  llvm/test/LTO/Resolution/X86/dead-strip-fulllto.ll
  llvm/test/LTO/Resolution/X86/diagnostic-handler-remarks-with-hotness.ll
  llvm/test/LTO/Resolution/X86/diagnostic-handler-remarks.ll
  llvm/test/LTO/Resolution/X86/export-jumptable.ll
  llvm/test/LTO/Resolution/X86/function-alias-non-prevailing.ll
  llvm/test/LTO/Resolution/X86/ifunc.ll
  llvm/test/LTO/Resolution/X86/intrinsic.ll
  llvm/test/LTO/Resolution/X86/link-odr-availextern.ll
  llvm/test/LTO/Resolution/X86/linker-redef-thin.ll
  llvm/test/LTO/Resolution/X86/linker-redef.ll
  llvm/test/LTO/Resolution/X86/linkonce.ll
  llvm/test/LTO/Resolution/X86/load-sample-prof-icp.ll
  llvm/test/LTO/Resolution/X86/load-sample-prof-lto.ll
  llvm/test/LTO/Resolution/X86/load-sample-prof.ll
  llvm/test/LTO/Resolution/X86/local-def-dllimport.ll
  llvm/test/LTO/Resolution/X86/lowertypetests.ll
  llvm/test/LTO/Resolution/X86/lto-unit-check.ll
  llvm/test/LTO/Resolution/X86/mixed_lto.ll
  llvm/test/LTO/Resolution/X86/mod-asm-used.ll
  llvm/test/LTO/Resolution/X86/multi-thinlto.ll
  llvm/test/LTO/Resolution/X86/not-prevailing-alias.ll
  llvm/test/LTO/Resolution/X86/not-prevailing-variables.ll
  llvm/test/LTO/Resolution/X86/not-prevailing.ll
  llvm/test/LTO/Resolution/X86/setting-dso-local.ll
  llvm/test/LTO/Resolution/X86/symtab-elf.ll
  llvm/test/LTO/Resolution/X86/type-checked-load.ll
  llvm/test/LTO/X86/Inputs/codemodel-3.ll
  llvm/test/LTO/X86/Inputs/type-mapping-bug2.ll
  llvm/test/LTO/X86/codemodel-1.ll
  llvm/test/LTO/X86/codemodel-2.ll
  llvm/test/LTO/X86/codemodel-3.ll
  llvm/test/LTO/X86/current-section.ll
  llvm/test/LTO/X86/dllimport.ll
  llvm/test/LTO/X86/internalize.ll
  llvm/test/LTO/X86/pr38046.ll
  llvm/test/LTO/X86/private-symbol.ll
  llvm/test/LTO/X86/strip-debug-info.ll
  llvm/test/LTO/X86/symver-asm.ll
  llvm/test/LTO/X86/symver-asm2.ll
  llvm/test/LTO/X86/symver-asm3.ll
  llvm/test/LTO/X86/tailcallelim.ll
  llvm/test/LTO/X86/triple-init.ll
  llvm/test/LTO/X86/triple-init2.ll
  llvm/test/LTO/X86/type-mapping-bug2.ll
  llvm/test/Linker/Inputs/odr-lambda-2.ll
  llvm/test/Linker/alias-3.ll
  llvm/test/Linker/debug-info-global-var.ll
  llvm/test/Linker/null_mapping_constant.ll
  llvm/test/Linker/odr-lambda-1.ll
  llvm/test/Linker/type-unique-simple2-b.ll
  llvm/test/Other/optimization-remarks-lazy-bfi.ll
  llvm/test/ThinLTO/X86/Inputs/alias_import.ll
  llvm/test/ThinLTO/X86/Inputs/alias_internal.ll
  llvm/test/ThinLTO/X86/Inputs/alias_resolution.ll
  llvm/test/ThinLTO/X86/Inputs/cache-icall.ll
  llvm/test/ThinLTO/X86/Inputs/cache-import-lists1.ll
  llvm/test/ThinLTO/X86/Inputs/cache-import-lists2.ll
  llvm/test/ThinLTO/X86/Inputs/cache-typeid-resolutions-import.ll
  llvm/test/ThinLTO/X86/Inputs/cache-typeid-resolutions1.ll
  llvm/test/ThinLTO/X86/Inputs/cache-typeid-resolutions2.ll
  llvm/test/ThinLTO/X86/Inputs/cache-typeid-resolutions3.ll
  llvm/test/ThinLTO/X86/Inputs/cache.ll
  llvm/test/ThinLTO/X86/Inputs/callees-metadata.ll
  llvm/test/ThinLTO/X86/Inputs/cfi-distributed.ll
  llvm/test/ThinLTO/X86/Inputs/cfi-icall-only-bazqux.ll
  llvm/test/ThinLTO/X86/Inputs/crash_debuginfo.ll
  llvm/test/ThinLTO/X86/Inputs/deadstrip.ll
  llvm/test/ThinLTO/X86/Inputs/debuginfo-compositetype-import.ll
  llvm/test/ThinLTO/X86/Inputs/debuginfo-cu-import.ll
  llvm/test/ThinLTO/X86/Inputs/diagnostic-handler-remarks.ll
  llvm/test/ThinLTO/X86/Inputs/dicompositetype-unique-alias.ll
  llvm/test/ThinLTO/X86/Inputs/dicompositetype-unique.ll
  llvm/test/ThinLTO/X86/Inputs/dicompositetype-unique2.ll
  llvm/test/ThinLTO/X86/Inputs/distributed_import.ll
  llvm/test/ThinLTO/X86/Inputs/distributed_indexes.ll
  llvm/test/ThinLTO/X86/Inputs/dot-dumper.ll
  llvm/test/ThinLTO/X86/Inputs/dot-dumper2.ll
  llvm/test/ThinLTO/X86/Inputs/drop-debug-info.ll
  llvm/test/ThinLTO/X86/Inputs/emit_imports.ll
  llvm/test/ThinLTO/X86/Inputs/emit_imports2.ll
  llvm/test/ThinLTO/X86/Inputs/empty.ll
  llvm/test/ThinLTO/X86/Inputs/empty_module_with_cache.ll
  llvm/test/ThinLTO/X86/Inputs/export.ll
  llvm/test/ThinLTO/X86/Inputs/funcimport-debug.ll
  llvm/test/ThinLTO/X86/Inputs/funcimport-tbaa.ll
  llvm/test/ThinLTO/X86/Inputs/funcimport.ll
  llvm/test/ThinLTO/X86/Inputs/funcimport2.ll
  llvm/test/ThinLTO/X86/Inputs/function_entry_count.ll
  llvm/test/ThinLTO/X86/Inputs/globals-import-blockaddr.ll
  llvm/test/ThinLTO/X86/Inputs/globals-import-cf-baz.ll
  llvm/test/ThinLTO/X86/Inputs/globals-import.ll
  llvm/test/ThinLTO/X86/Inputs/import_opaque_type.ll
  llvm/test/ThinLTO/X86/Inputs/index-const-prop-alias.ll
  llvm/test/ThinLTO/X86/Inputs/index-const-prop-cache-foo.ll
  llvm/test/ThinLTO/X86/Inputs/index-const-prop-cache-test1.ll
  llvm/test/ThinLTO/X86/Inputs/index-const-prop-cache-test2.ll
  llvm/test/ThinLTO/X86/Inputs/index-const-prop-comdat.ll
  llvm/test/ThinLTO/X86/Inputs/index-const-prop-define-g.ll
  llvm/test/ThinLTO/X86/Inputs/index-const-prop-full-lto.ll
  llvm/test/ThinLTO/X86/Inputs/index-const-prop-gvref.ll
  llvm/test/ThinLTO/X86/Inputs/index-const-prop-linkage.ll
  llvm/test/ThinLTO/X86/Inputs/index-const-prop.ll
  llvm/test/ThinLTO/X86/Inputs/lazyload_metadata.ll
  llvm/test/ThinLTO/X86/Inputs/linkonce_aliasee_ref_import.ll
  llvm/test/ThinLTO/X86/Inputs/linkonce_odr_unnamed_addr.ll
  llvm/test/ThinLTO/X86/Inputs/linkonce_resolution_comdat.ll
  llvm/test/ThinLTO/X86/Inputs/llvm.used.ll
  llvm/test/ThinLTO/X86/Inputs/local_name_conflict1.ll
  llvm/test/ThinLTO/X86/Inputs/local_name_conflict2.ll
  llvm/test/ThinLTO/X86/Inputs/local_name_conflict_var1.ll
  llvm/test/ThinLTO/X86/Inputs/local_name_conflict_var2.ll
  llvm/test/ThinLTO/X86/Inputs/merge-triple.ll
  llvm/test/ThinLTO/X86/Inputs/module_asm.ll
  llvm/test/ThinLTO/X86/Inputs/module_asm2.ll
  llvm/test/ThinLTO/X86/Inputs/noinline.ll
  llvm/test/ThinLTO/X86/Inputs/personality-local.ll
  llvm/test/ThinLTO/X86/Inputs/personality.ll
  llvm/test/ThinLTO/X86/Inputs/pr35472.ll
  llvm/test/ThinLTO/X86/Inputs/reference_non_importable.ll
  llvm/test/ThinLTO/X86/Inputs/referenced_by_constant.ll
  llvm/test/ThinLTO/X86/Inputs/section.ll
  llvm/test/ThinLTO/X86/Inputs/strong_non_prevailing.ll
  llvm/test/ThinLTO/X86/Inputs/thinlto-internalize-used2.ll
  llvm/test/ThinLTO/X86/Inputs/weak_resolution.ll
  llvm/test/ThinLTO/X86/alias_import.ll
  llvm/test/ThinLTO/X86/alias_internal.ll
  llvm/test/ThinLTO/X86/alias_resolution.ll
  llvm/test/ThinLTO/X86/autoupgrade.ll
  llvm/test/ThinLTO/X86/builtin-nostrip.ll
  llvm/test/ThinLTO/X86/cache-config.ll
  llvm/test/ThinLTO/X86/cache-icall.ll
  llvm/test/ThinLTO/X86/cache-import-lists.ll
  llvm/test/ThinLTO/X86/cache-typeid-resolutions.ll
  llvm/test/ThinLTO/X86/cache.ll
  llvm/test/ThinLTO/X86/callees-metadata.ll
  llvm/test/ThinLTO/X86/cfi-devirt.ll
  llvm/test/ThinLTO/X86/cfi-distributed.ll
  llvm/test/ThinLTO/X86/cfi-icall-only-defuse.ll
  llvm/test/ThinLTO/X86/cfi-icall.ll
  llvm/test/ThinLTO/X86/cfi.ll
  llvm/test/ThinLTO/X86/crash_debuginfo.ll
  llvm/test/ThinLTO/X86/deadstrip.ll
  llvm/test/ThinLTO/X86/debuginfo-compositetype-import.ll
  llvm/test/ThinLTO/X86/debuginfo-cu-import.ll
  llvm/test/ThinLTO/X86/devirt-after-icp.ll
  llvm/test/ThinLTO/X86/devirt.ll
  llvm/test/ThinLTO/X86/diagnostic-handler-remarks-with-hotness.ll
  llvm/test/ThinLTO/X86/diagnostic-handler-remarks.ll
  llvm/test/ThinLTO/X86/dicompositetype-unique-alias.ll
  llvm/test/ThinLTO/X86/dicompositetype-unique.ll
  llvm/test/ThinLTO/X86/dicompositetype-unique2.ll
  llvm/test/ThinLTO/X86/distributed_import.ll
  llvm/test/ThinLTO/X86/distributed_indexes.ll
  llvm/test/ThinLTO/X86/dot-dumper-full-lto.ll
  llvm/test/ThinLTO/X86/dot-dumper.ll
  llvm/test/ThinLTO/X86/dot-dumper2.ll
  llvm/test/ThinLTO/X86/drop-debug-info.ll
  llvm/test/ThinLTO/X86/dsolocal_dllimport.ll
  llvm/test/ThinLTO/X86/emit_imports.ll
  llvm/test/ThinLTO/X86/empty-module.ll
  llvm/test/ThinLTO/X86/empty_module_with_cache.ll
  llvm/test/ThinLTO/X86/export.ll
  llvm/test/ThinLTO/X86/funcimport-debug.ll
  llvm/test/ThinLTO/X86/funcimport-tbaa.ll
  llvm/test/ThinLTO/X86/funcimport.ll
  llvm/test/ThinLTO/X86/funcimport2.ll
  llvm/test/ThinLTO/X86/function_entry_count.ll
  llvm/test/ThinLTO/X86/globals-import-blockaddr.ll
  llvm/test/ThinLTO/X86/globals-import-const-fold.ll
  llvm/test/ThinLTO/X86/globals-import.ll
  llvm/test/ThinLTO/X86/import_opaque_type.ll
  llvm/test/ThinLTO/X86/index-const-prop-O0.ll
  llvm/test/ThinLTO/X86/index-const-prop-alias.ll
  llvm/test/ThinLTO/X86/index-const-prop-cache.ll
  llvm/test/ThinLTO/X86/index-const-prop-comdat.ll
  llvm/test/ThinLTO/X86/index-const-prop-dead.ll
  llvm/test/ThinLTO/X86/index-const-prop-full-lto.ll
  llvm/test/ThinLTO/X86/index-const-prop-gvref.ll
  llvm/test/ThinLTO/X86/index-const-prop-ldst.ll
  llvm/test/ThinLTO/X86/index-const-prop-linkage.ll
  llvm/test/ThinLTO/X86/index-const-prop.ll
  llvm/test/ThinLTO/X86/index-const-prop2.ll
  llvm/test/ThinLTO/X86/internalize.ll
  (108 more files...)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64931.210607.patch
Type: text/x-patch
Size: 208380 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190718/5aaea24c/attachment-0001.bin>


More information about the llvm-commits mailing list