[all-commits] [llvm/llvm-project] 1e7ec4: [AST] Get field size in chars rather than bits in ...

Bevin Hansson via All-commits all-commits at lists.llvm.org
Thu Aug 20 01:31:19 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 1e7ec4842c1a8b0c686e5674e215012867938a8d
      https://github.com/llvm/llvm-project/commit/1e7ec4842c1a8b0c686e5674e215012867938a8d
  Author: Bevin Hansson <bevin.hansson at ericsson.com>
  Date:   2020-08-20 (Thu, 20 Aug 2020)

  Changed paths:
    M clang/lib/AST/RecordLayoutBuilder.cpp

  Log Message:
  -----------
  [AST] Get field size in chars rather than bits in RecordLayoutBuilder.

In D79719, LayoutField was refactored to fetch the size of field
types in bits and then convert to chars, rather than fetching
them in chars directly. This is not ideal, since it makes the
calculations char size dependent, and breaks for sizes that
are not a multiple of the char size.

This patch changes it to use getTypeInfoInChars instead of
getTypeInfo.

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D85191


  Commit: 1a995a0af3c4e97c1135b6c9c3a243072ee0463c
      https://github.com/llvm/llvm-project/commit/1a995a0af3c4e97c1135b6c9c3a243072ee0463c
  Author: Bevin Hansson <bevin.hansson at ericsson.com>
  Date:   2020-08-20 (Thu, 20 Aug 2020)

  Changed paths:
    M clang/include/clang/AST/APValue.h
    M clang/include/clang/AST/ASTContext.h
    M clang/include/clang/AST/Expr.h
    M clang/include/clang/AST/OptionalDiagnostic.h
    R clang/include/clang/Basic/FixedPoint.h
    M clang/lib/AST/ASTContext.cpp
    M clang/lib/AST/ExprConstant.cpp
    M clang/lib/AST/Type.cpp
    M clang/lib/Basic/CMakeLists.txt
    R clang/lib/Basic/FixedPoint.cpp
    M clang/lib/CodeGen/CGExprScalar.cpp
    M clang/lib/Sema/SemaChecking.cpp
    M clang/lib/Sema/SemaExpr.cpp
    M clang/lib/Serialization/ASTReader.cpp
    M clang/lib/Serialization/ASTWriter.cpp
    M clang/unittests/Basic/CMakeLists.txt
    R clang/unittests/Basic/FixedPointTest.cpp
    A llvm/include/llvm/ADT/APFixedPoint.h
    A llvm/lib/Support/APFixedPoint.cpp
    M llvm/lib/Support/CMakeLists.txt
    A llvm/unittests/ADT/APFixedPointTest.cpp
    M llvm/unittests/ADT/CMakeLists.txt

  Log Message:
  -----------
  [ADT] Move FixedPoint.h from Clang to LLVM.

This patch moves FixedPointSemantics and APFixedPoint
from Clang to LLVM ADT.

This will make it easier to use the fixed-point
classes in LLVM for constructing an IR builder for
fixed-point and for reusing the APFixedPoint class
for constant evaluation purposes.

RFC: http://lists.llvm.org/pipermail/llvm-dev/2020-August/144025.html

Reviewed By: leonardchan, rjmccall

Differential Revision: https://reviews.llvm.org/D85312


  Commit: f03b10f57ebbd10ff37e819ecd86f9e8790be638
      https://github.com/llvm/llvm-project/commit/f03b10f57ebbd10ff37e819ecd86f9e8790be638
  Author: Bevin Hansson <bevin.hansson at ericsson.com>
  Date:   2020-08-20 (Thu, 20 Aug 2020)

  Changed paths:
    A llvm/include/llvm/IR/FixedPointBuilder.h
    M llvm/include/llvm/module.modulemap

  Log Message:
  -----------
  [IR] Add FixedPointBuilder.

This patch adds a convenience class for using FixedPointSemantics
to build fixed-point operations in IR.

RFC: http://lists.llvm.org/pipermail/llvm-dev/2020-August/144025.html

Reviewed By: rjmccall

Differential Revision: https://reviews.llvm.org/D85314


  Commit: 44ebc2c8ebc8cdbd4f45e50a529faf8a990732e5
      https://github.com/llvm/llvm-project/commit/44ebc2c8ebc8cdbd4f45e50a529faf8a990732e5
  Author: Bevin Hansson <bevin.hansson at ericsson.com>
  Date:   2020-08-20 (Thu, 20 Aug 2020)

  Changed paths:
    M clang/test/Frontend/fixed_point_add.c
    A clang/test/Frontend/fixed_point_add_const.c
    M clang/test/Frontend/fixed_point_compound.c
    M clang/test/Frontend/fixed_point_div.c
    A clang/test/Frontend/fixed_point_div_const.c
    M clang/test/Frontend/fixed_point_mul.c
    A clang/test/Frontend/fixed_point_mul_const.c
    M clang/test/Frontend/fixed_point_sub.c
    A clang/test/Frontend/fixed_point_sub_const.c
    M clang/test/Frontend/fixed_point_unary.c

  Log Message:
  -----------
  Refactor most of the fixed-point tests.

The tests were not written with update_cc_test_checks
in mind, which make them difficult to update. Fix this.

Also, some of the consteval tests were outright broken,
since the CHECK lines were wrong.

Other than this, the semantics of the tests are preserved.


Compare: https://github.com/llvm/llvm-project/compare/33f574672f40...44ebc2c8ebc8


More information about the All-commits mailing list